Force/Redirect DNS queries to 8.8.8.8 to another DNS server (internal or external)
-
Hi,
I've looked around, but could not find an immediate answer.
Here is the situation:
- PFSense DHCP is configured to send/set 2 internal DNS servers for any client on the network to use
- I've some (home automation) devices on my network, with little configuration options (basically set wifi name and wifi passphrase, that's it)
- which get an IP address from PFSense
- BUT, they are not using the DNS servers given by my DHCP setup. It seems the vendor is hardcoding the DNS server (in many cases those of google)
The question :
- is there a way to force or redirect and queries arriving on the FW "SOURCEIP -> 8.8.8.8:53"
- to another DNS server (preferably internal one, or at minimum for example 1.1.1.1)
Thanks
-
Yes there is! You can use NAT with redirection. Change its destination IP from 8.8.8.8 -> 1.1.1.1 with redirect target IP
-
https://docs.netgate.com/pfsense/en/latest/dns/redirecting-all-dns-requests-to-pfsense.html
-
Thanks for the info
with that, I'll try to figure out my ideal setup :
I've 2 internal DNS,
x.x.x.12 and x.x.x.13
which are allowed to (and will) forward non-internal or local requests to Cloudflare DNS (1.1.1.1, 1.0.0.1)
The Firewall itself is also allowed to forward to Cloudflare DNS
All other requests which are not going to one of the internal dns first (like for those devices with hardcoded dns) should be forced to one of the internal dnsWould that also be possible?
Thanks
-
Has anyone else tried a similar setup before?
-
i do this with several devices on my network.
- create static mappings for the devices
- find the device under services > DHCP server > at the bottom of the page edit the properties of the device > under DNS servers. add which ever DNS server you want. then apply/ apply. and reboot the device
-
@bcruze said in Force/Redirect DNS queries to 8.8.8.8 to another DNS server (internal or external):
i do this with several devices on my network.
- create static mappings for the devices
- find the device under services > DHCP server > at the bottom of the page edit the properties of the device > under DNS servers. add which ever DNS server you want. then apply/ apply. and reboot the device
This has no effect on hardcoded DNS servers.
You should use nat with redirection