Skip to content

Instantly share code, notes, and snippets.

@MinaMikhailcom
Last active January 18, 2018 01:43
Show Gist options
  • Save MinaMikhailcom/09c870391ad897371c982b9d07e5a3e8 to your computer and use it in GitHub Desktop.
Save MinaMikhailcom/09c870391ad897371c982b9d07e5a3e8 to your computer and use it in GitHub Desktop.
Use DNSCrypt for local network DNS queries
dnscrypt-proxy -a 192.168.1.2 -L /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv -R ns0.dnscrypt.is
# "-a": The local IP that will listen to other devices DNS requests (by default it listen on DNS port 53),
# can be phones (Since DNSCrypt can't run on non-rooted IOS or android devices),
# where you will manually need to configure WIFI to use 192.168.1.2 for the DNS server.
# For the same local machine that runs this DNSCrypt command, use 192.168.1.2 in /etc/resolv.conf
# "-L": The path to "dnscrypt-resolvers.csv" file where it includes all the servers that can be used with DNSCrypt.
# "-R": The DNS resolver name, copy the server name from "dnscrypt-resolvers.csv" file.
## Verify
$ dig debug.opendns.com TXT +short
"server m4.cdg"
"flags 20 0 70 7980000000000000000"
"originid 0"
"actype 0"
"source "xx.xxx.xxx.xx:xxx" #Your IP
"dnscrypt enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment