Multiple IPs for Single Name in Host Override?



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


  • Banned

    
    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
    
    


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


  • Banned

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



  • @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.


  • LAYER 8 Global Moderator

    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.



  • @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.




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


  • Banned

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



  • @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.


Log in to reply