Why no DNS Round Robin with simple DNSMasq on PFSense WebUI?
-
So DNSmasq supports DNS Round Robin, and does it by having multiple entries in /etc/hosts of the same hostname, each with different IP's.
I'm able to have a cron job go through and constantly check for and re-apply the 2nd entry in /etc/hosts for me, to work around this limitation in the WebUI. But since it works so well, without needing TinyDNS… Why is it not possible to create these multiple entries via the WebUI? It won't let you. In fact, it will strip out the second IP in /etc/hosts if any DNS updates are handled via the WebUI... (hence the cron job to keep checking and re-adding it)
I figure there must be some reason, like an old bug that was caused by enabling the feature's use, or something.
Anyone know why?
-
On what version of pfSense?
I know on 2.1 it does let you make an IPv6 entry in addition to an IPv4 entry, but it still appears to reject multiple IPv4 entries. If it does work, I'm not entirely sure why (other than it would make reverse DNS resolution ambiguous)
-
How about this as simple method, create a file.. I used /tmp/robin and in this file I put
[2.1-RC0][admin@pfsense.local.lan]/tmp(5): cat /tmp/robin
192.168.1.10 robin.local.lan
192.168.1.11 robin.local.lan
192.168.1.12 robin.local.lannow in advanced options of dns forwarder I added (in the gui)
addn-hosts=/tmp/robinNow when I do a query for robin.local.lan I get round robin response - see how the answers rotate order
C:\Windows\System32>dig robin.local.lan +short
192.168.1.10
192.168.1.11
192.168.1.12C:\Windows\System32>dig robin.local.lan +short
192.168.1.12
192.168.1.10
192.168.1.11C:\Windows\System32>dig robin.local.lan +short
192.168.1.11
192.168.1.12
192.168.1.10Now your hosts wont be listed in the gui under dns forwarders host over rides, but would remove your need for a cron job to put them back and errors in the gui, etc.
jimp
"(other than it would make reverse DNS resolution ambiguous)"Why do you think that? If I do a ptr query it still returns the forward for that IP
C:\Windows\System32>dig -x 192.168.1.10 +short
robin.local.lan.C:\Windows\System32>dig -x 192.168.1.11 +short
robin.local.lan.C:\Windows\System32>dig -x 192.168.1.12 +short
robin.local.lan.I don't know if I would use /tmp as place to store your addn-hosts file, but this was just a test - I currently have no use of round robin entries.
btw: I am currently running
2.1-RC0 (i386)
built on Tue Jul 16 02:16:11 EDT 2013
FreeBSD 8.3-RELEASE-p8 -
Great idea!
Thanks!
Hopefully the feature can come to the GUI some day. :)
-
Yes, that works nicely.
Thank you!
I chose to use /etc/roundrobin for my file. :)