Can you implement DNS Round Robin for local IP's?



  • I have a couple of local Pi-Hole DNS servers on my home network for redundancy in case a I take one down for maintenance ( add memory, hard drive , etc ) . I’m looking for a way to direct DNS requests to servers that are online, so that if one is offline, computers on my home network are unaffected.

    Currently DHCP hands out the addresses of both in hope that if one does not respond, the client is smart enough to try the other DNS server.

    Ideally though, this should be hidden from the client and they should only query online DNS servers.

    I would be great if pfsense could do this ,but if I need a 3rd party solution ( open source, of course! ) that would be fine , too.

    Edit
    I realized that I didn’t provide enough information for anyone to answer my question

    1. My current DNS for workstation computers and my mobile devices ( iPhone, tablets ) is
      client -> pihole -> pfsense DNS Server -> Internet DNS

    With Pfsense DNS resolving local server names to IP addresses
    e.g
    plex.local for my Plex server
    synology.local for my Synology NAS server
    kvm.locak for my KVM server, and so on.

    1. Servers - I don’t browse the Internet on my servers, so they only need to find each other and also Yum repositories for updates, so they look like this
      server -> pfsense DNS server -> Internet

    2. Same for home automation devices, game consoles, etc
      <device> -> pfsense DNS server -> Internet

    I hope that this helps.

    I’m wondering if I can simplify things by having everyone go to pfsense DNS, then have pfsense forward to pi-hole, and pi-hole forwards to Internet DNS ( 8.8.8.8 or similar )
    i.e. <all clients> -> pfSense DNS -> pi-hole -> Internet DNS.

    Would that work if one of the pi-hole servers is offline? Other than slowing down DNS response times in some cases, it doesn’t seem too bad of a setup.


  • Galactic Empire

    Have you had a look at using load balancer, I think it would round robin, if not it would automatically fail over to the other host.

    You might have to monitor on ICMP as you can’t use UDP.

    https://doc.pfsense.org/index.php/Inbound_Load_Balancing



  • @nogbadthebad said in Can you implement DNS Round Robin for local IP's?:

    Have you had a look at using load balancer, I think it would round robin, if not it would automatically fail over to the other host.

    You might have to monitor on ICMP as you can’t use UDP.

    https://doc.pfsense.org/index.php/Inbound_Load_Balancing

    I’ve looked at it and even create an load balancing group with both Pi-Hole servers in it. But it appears that the requests have to arrive from the WAN interface to be forwarded to the load balancer group. Internal request were not forwarded, and all of my DNS requests are from the internal / home network.


  • Galactic Empire

    @pfkomrad

    Can you put them on a different internal subnet?

    I had a play with a couple devices and it did balance then, i just tested with ssh.


 

© Copyright 2002 - 2018 Rubicon Communications, LLC | Privacy Policy