The biggest problem with Ubiquiti and Pi-hole is that if the Pi-hole server goes down, the DNS server in Ubiquiti will stop functioning properly. If you want to set up failover, in practice this is impossible. Adding a second DNS server in Ubiquiti will result in Ubiquiti using them alternately, which makes Pi-hole meaningless. The only solution is to set "strict-order" in the dnsmasq config, with DNS1 in Ubiquiti set to Pi-hole, and DNS2 set, for example, to the public 8.8.8.8. Below is a patch that enables this behavior.
1. Install FAN control for UCG Fiber which will add to auto start with router restart
( Source: GitHub - iceteaSA/ucg-max-fan-control: UXG-Max/Fibre Dynamic Fan Control )
2. Once installed go to:
3. Create
4. Paste code bellow:
5. Edit
6. Bellow bash header enter:
7. From now each reboot your dnsmasq custom conf will apply.
1. Install FAN control for UCG Fiber which will add to auto start with router restart
Bash:
curl -sSL https://raw.githubusercontent.com/iceteaSA/ucg-max-fan-control/main/install.sh | sudo bash
2. Once installed go to:
Bash:
cd /data/fan-control/
3. Create
05-custom_apply.conf
file with commands:
Bash:
apt install mc
medit 05-custom_apply.conf
4. Paste code bellow:
INI:
strict-order # dnsmasq will send queries to any of the upstream servers
no-negcache # Disable negative caching
min-cache-ttl=1800 # min 30 min
max-cache-ttl=86400 # 1 day maximum
cache-size=10240
# reload
# sudo pkill -USR1 dnsmasq && tail -50 /var/log/daemon.log |grep dnsmasq
5. Edit
fan-control.sh
:
Bash:
mcedit fan-control.sh
6. Bellow bash header enter:
Bash:
[ -f "/etc/dnsmasq.d/05-custom_apply.conf" ] || cp -af 05-custom_apply.conf /etc/dnsmasq.d/05-custom_apply.conf
7. From now each reboot your dnsmasq custom conf will apply.