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

    Multiple IPs for Single Name in Host Override?

    DHCP and DNS
    4
    10
    2.2k
    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.
    • J
      jasonlitka
      last edited by

      Any ideas on how I can add multiple IP addresses in the host overrides section of the DNS Forwarder for a single host name?  I've got two Active-Active load balancers, each with their own IP, and a setup that relies on a combination of round-robin via DNS and VRRP to move IPs in the event of a failure or maintenance.

      This system is still running 2.1.5, so I'm not sure if moving to 2.2.x will resolve the issue.

      I can break anything.

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        
        address=/host.example.com/192.0.2.1
        address=/host.example.com/192.0.2.2
        address=/host.example.com/192.0.2.3
        
        

        Doesn't work?

        
        addn-hosts=/path/to/some/hosts/file
        
        
        
        $ cat /path/to/some/hosts/file
        192.0.2.1 host.example.com
        192.0.2.2 host.example.com
        192.0.2.3 host.example.com
        
        
        1 Reply Last reply Reply Quote 0
        • J
          jasonlitka
          last edited by

          Not sure what you're suggesting I do with that.  I'm talking about overrides for the DNS Forwarder in pfSense (used by my network for split dns), not in the hosts file for pfSense itself.

          I can break anything.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Hmmm?! Both of the above is intended for dnsmasq and has nothing to do with /etc/hosts.

            1 Reply Last reply Reply Quote 0
            • J
              jasonlitka
              last edited by

              @doktornotor:

              Hmmm?! Both of the above is intended for dnsmasq and has nothing to do with /etc/hosts.

              Ok, so what you're saying is that it would work but the UI blocks it.  There's no way to add multiple entries for the same host, nor is there an "Advanced" section where I can just paste that config.

              I can break anything.

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

                What he is saying is how to add it, even though the gui doesn't not allow it.. Just put them in a file and load them via the advanced options.

                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.7.2, 24.11

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

                  @Jason:

                  @doktornotor:

                  Hmmm?! Both of the above is intended for dnsmasq and has nothing to do with /etc/hosts.

                  Ok, so what you're saying is that it would work but the UI blocks it.  There's no way to add multiple entries for the same host, nor is there an "Advanced" section where I can just paste that config.

                  dnsmasq_advanced.jpg
                  dnsmasq_advanced.jpg_thumb

                  1 Reply Last reply Reply Quote 0
                  • J
                    jasonlitka
                    last edited by

                    Doesn't work.  I tried adding two "address" lines and all it ever returns on query is the first one.  I tried adding an "addn-hosts" line with the "address" lines in a separate file and I get non-existent domain.

                    EDIT:  The additional hosts file with the format of "IP Name" works, but the order never changes like it does with DNSMadeEasy when I setup multiple A records for a name.  It's better than nothing though.

                    I can break anything.

                    1 Reply Last reply Reply Quote 0
                    • D
                      doktornotor Banned
                      last edited by

                      @Jason:

                      I tried adding an "addn-hosts" line with the "address" lines

                      Yeah, that is the problem. You are doing it wrong; it should have no address= lines, it should look like a hosts file.

                      1 Reply Last reply Reply Quote 0
                      • J
                        jasonlitka
                        last edited by

                        @doktornotor:

                        @Jason:

                        I tried adding an "addn-hosts" line with the "address" lines

                        Yeah, that is the problem. You are doing it wrong; it should have no address= lines, it should look like a hosts file.

                        Yup, just figured that out.  Thanks.

                        I can break anything.

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