Last active
February 19, 2021 17:10
-
-
Save themagic314/af797685821f3eb941e7e2b5c6333d1a to your computer and use it in GitHub Desktop.
Unifi redirect all dns query to adguard/pihole. (config.gateway.json)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"service":{ | |
"nat":{ | |
"rule":{ | |
"1":{ | |
"description":"Redirect DNS queries to adguard/pihole", | |
"destination":{ | |
"port":"53" | |
}, | |
"source":{ | |
"address":"!xx.xx.xx.xx" | |
}, | |
"inside-address":{ | |
"address":"xx.xx.xx.xx", | |
"port":"53" | |
}, | |
"inbound-interface":"eth1", | |
"protocol":"tcp_udp", | |
"type":"destination" | |
}, | |
"5002":{ | |
"description":"Translate reply back", | |
"destination":{ | |
"address":"xx.xx.xx.xx", | |
"port":"53" | |
}, | |
"outbound-interface":"eth1", | |
"protocol":"tcp_udp", | |
"type":"masquerade" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace xx.xx.xx.xx with your adguard/pihole IP.
Replace "eth1" in "outbound-interface" with your lan interface.
How-to edit config.gateway.json