This page documents the complete high-availability DNS filtering solution used in the TorresVault network. The setup provides fault-tolerant DNS, automatic sync, and a floating VIP so clients always reach a working Pi-hole instance.
Two Pi-hole servers provide DNS filtering:
High availability is provided by:
This ensures:
| Component | Hostname | IP Address | Role |
|---|---|---|---|
| Pi-hole 1 | pihole | 192.168.1.2 | Primary Pi-hole, may own VIP |
| Pi-hole 2 | pihole2 | 192.168.1.4 | Secondary Pi-hole, may own VIP |
| DNS VIP | n/a | 192.168.1.5 | Floating IP assigned via Keepalived |
| DHCP Server | UCG Max | 192.168.1.1 | Hands out DNS = 192.168.1.5 |
Both Pi-holes run `keepalived` and use VRRP.
vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 200 advert_int 1 authentication { auth_type PASS auth_pass torresvault } virtual_ipaddress { 192.168.1.5/24 } }
vrrp_instance VI_1 { state BACKUP interface eth0 virtual_router_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass torresvault } virtual_ipaddress { 192.168.1.5/24 } }
Keepalived automatically transfers 192.168.1.5 to the healthy node.
Orbital-Sync keeps:
…identical on both Pi-holes.
Located at `/home/nathan/orbital-sync/docker-compose.yml`
version: “3” services: orbital-sync: image: mattwebbio/orbital-sync:latest container_name: orbital-sync volumes: - ./config.yml:/config.yml:ro restart: unless-stopped
primaryHost: baseUrl: http://192.168.1.2
secondaryHosts:
baseUrl: http://192.168.1.4
sync: intervalMinutes: 15 adlists: true whitelist: true blacklist: true regexWhitelist: true regexBlacklist: true groups: true clients: true localDns: true cname: true
Orbital-sync runs automatically:
It detects changes on either Pi-hole and ensures both match.
docker exec orbital-sync npm run sync
OR restart the container:
docker restart orbital-sync
Failover time: typically 1–2 seconds.
1. Open a terminal on Pi-hole1 2. Run:
sudo systemctl stop keepalived
3. The VIP should instantly move:
4. Restart keepalived:
sudo systemctl start keepalived
Common issues: