How to setup a backup DNS server

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

How to setup a backup DNS server

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
How to setup a backup DNS server
How to setup a backup DNS server
2024-02-07 04:19:19 - last edited 2024-02-09 02:44:33
Model: OC200  
Hardware Version:
Firmware Version:

I currently have my DNS server set to 'Manual' and points to the IP address of my local PiHole server (Set under Settings > Wired Networks > LAN > DNS Server). The PiHole server has gone down before and all my DNS resolution started to fail.

 

How can I set it up so that: if the PiHole server fails to respond to DNS requests, automatically fail over to Cloudflare DNS (1.1.1.1)?

 

There are two input boxes for IP address in under "DNS Server", but if I put my PiHole IP in the first box, and Cloudflare DNS in the second, it does not switch to the Cloudflare DNS if the PiHole fails.

 

 

  0      
  0      
#1
Options
1 Reply
Re:How to setup a backup DNS server
2024-02-22 14:23:10

  @runandrew21941 One option would be to add a second pihole and sync the two so you have local DNS failover. Setting this up is a two-step process... first, install gravity-sync on both pihole devices. Then install keepalived on both. When configuring keepalived on each device, you identify the source IP (IP of the device you're currently configuring) and the reference IP (IP of the other pihole device), and then a virtual IP. The virtual IP will be the same for both devices and that is the IP you utilize as your DNS server IP address for clients.

Keepalived provides the failover and will automatically switch between the two pihole devices based on accessiblity. This is nice because you can apply updates and reboot the devices independently without impacting network connectivity.  I'm using this configuration and so far things have been running smoothly for me.
 

  0  
  0  
#2
Options

Information

Helpful: 0

Views: 344

Replies: 1

Related Articles