Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Why no DNS Round Robin with simple DNSMasq on PFSense WebUI?

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 3 Posters 6.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      thedarb
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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)

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          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.lan

          now in advanced options of dns forwarder I added (in the gui)
          addn-hosts=/tmp/robin

          Now 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.12

          C:\Windows\System32>dig robin.local.lan +short
          192.168.1.12
          192.168.1.10
          192.168.1.11

          C:\Windows\System32>dig robin.local.lan +short
          192.168.1.11
          192.168.1.12
          192.168.1.10

          Now 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

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • T
            thedarb
            last edited by

            Great idea!

            Thanks!

            Hopefully the feature can come to the GUI some day.  :)

            1 Reply Last reply Reply Quote 0
            • T
              thedarb
              last edited by

              Yes, that works nicely.

              Thank you!

              I chose to use /etc/roundrobin for my file. :)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.