Skip to content

Instantly share code, notes, and snippets.

@sirkirby
Created February 20, 2024 18:29
Show Gist options
  • Save sirkirby/391e0eff059dd28d9ccbf0c2e8161cdb to your computer and use it in GitHub Desktop.
Save sirkirby/391e0eff059dd28d9ccbf0c2e8161cdb to your computer and use it in GitHub Desktop.
dnsdist configuration
-- Define your Pi-hole DNS servers
newServer({address="10.10.10.254", name="pihole-cluster", checkName="cloudflare.com", checkInterval=30})
newServer({address="10.10.10.5", name="pihole1", checkName="cloudflare.com", checkInterval=30})
newServer({address="10.10.10.6", name="pihole2", checkName="cloudflare.com", checkInterval=30})
-- Set the load balancing policy
setServerPolicy(roundrobin)
-- Listen on port 53 (DNS)
addLocal("0.0.0.0:53")
addLocal("[::]:53")
-- Use the console to manage dnsdist
controlSocket("127.0.0.1:5199")
setKey("myCustomKey")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment