Clear dnsmasq lease from Unifi USG

The file to remove the lease from is /var/run/dnsmasq-dhcp.leases

Forward DNS to Pihole/Adguard

Set DHCP’s DNS server as your router’s IP. Then in the router’s config configure forwarding section of DNS.

dns {
        forwarding {
            cache-size 0
            listen-on switch0
            name-server 10.0.0.10
        }
    }

Route domain to a specific IP

Add an option to route some domain to some IP (which e.g. hosts reverse proxy for that domain)

dns {
        forwarding {
            ...
            options address=/domain.local/10.0.0.99
        }
    }

Netboot

Enable these in Edgerouter to enable Netboot:

service dhcp-server global-parameters "allow booting;"
service dhcp-server shared-network-name LAN subnet 10.0.0.0/24 bootfile-name netboot.xyz.kpxe
service dhcp-server shared-network-name LAN subnet 10.0.0.0/24 bootfile-server 10.0.0.3