Use NextDNS as external DNS server for DHCP clients
-
Hello; I just installed NextDNS on a external device and have pointed my DHCP clients to use that DNS server IP. The upstream requests are working fine however all my DNS Overrides in the DNS resolver section are being ignored now. Does anyone know how my devices can still resolve those?
-
@iptvcld
If the clients on your LAN receive 1.2.3.4 as a DNS, = an IP 'somewhere on the Internet', then you've completely short circuited your pfSense DNS.
Solution : Remove the DNS IP "NextDNS" you've setup in your pfSense DHCP. From now on your LAN clients will receive the IP of pfSense again as the DNS.
Set up the resolver as a forwarder. Don't forget to remove the DNSSEC check box, as DNSSEC is only useful when resolving.,
Under System > General Setup, add the NextDNS IPs.From now on, unbound, the resolver, who isn't behaving as a resolver anymore, will receive the DNS requests from your LAN clients. If a request has an answer already present in the local DNS cache, or matches one of your DNS overrides, then it sends the answer back to the client.
If not, it will use NextDNS (a resolver) to get an answer for the DNS request. -
@iptvcld said in Use NextDNS as external DNS server for DHCP clients:
all my DNS Overrides in the DNS resolver section are being ignored now
the other way to skin that cat is to setup conditional forwarder(s) in your nextdns that says hey when someone looking for anything.home.arpa or whatever domain your using in pfsense for you local records go ask 192.168.1.1 or whatever pfsense IP address is.
-
@johnpoz I think thats it.. I added this line into the NextDNS config
forwarder mycompany.com=192.168.1.1Now my host overrides are responding back with the local IP's.
Whats odd is that my pfSense DNS Resolver port is set to 5553 and how did the below work if that defaults to port 53?
forwarder mycompany.com=192.168.1.1I tried this forwarder mycompany.com=192.168.1.1:5553 and it does not work
-
@iptvcld said in Use NextDNS as external DNS server for DHCP clients:
fSense DNS Resolver port is set to 5553
Where did you set that exactly? unbound would default to listen on 53..
Do you maybe have the forwarder listening on 53.. Clearly something is listening on 53 if you got an answer or your redirecting your dns that comes in on 53 to 5553? where unbound listens?
-
this is my DNS Resolver
And forwarder is off
I am also wondering the same on how it responded back to
forwarder mycompany.com=192.168.1.1 -
@iptvcld did you setup dns redirection.. That would explain it.
https://docs.netgate.com/pfsense/en/latest/recipes/dns-redirect.html#redirecting-client-dns-requests