When i set my dns on my android device and go to dns leak test it's not the dns that I set in the dns settings. Its the dns set by my ISP.

How can I get it to use the dns that I want?

for reference:
my device is a lemaker guitar
I do not have root access on the device
I am accessing my wifi at home



Maybe I need to have root and/or use an app like the one mentioned here - Override DNS.
Also need to work out what version of android it is, but think it is the most recent version.
Related question here leaving the ip as dynamic(currently giving it static ip from the router) and using apps to change change the dns.
Related Q here but he can't save the new dns settings.
A possible option here in one of the answers is use debugging mode and adb to change the dns settings, but my problem is not changing the dns it is getting the dns I change it to to work.


First you must have dnscrypt installed. These scripts require root access:

#root is required 

#daemonize dnscrypt
dnscrypt-proxy --daemonize --resolver-address= --provider-name=2.dnscrypt-cert.opendns.com --provider-key=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79

#this will redirect dns query traffics to localhost
iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination

If you want to restore DNS to default, run this:

iptables -t nat -D OUTPUT -p udp --dport 53 -j DNAT --to-destination

You can change the DNS but you will need to set a static IP as well. If you long press on the WiFi name you can change the options from there.

  • tks, I have done that, but it is not using the dns I set it to when I go to dns leak test.
    – HattrickNZ
    Sep 12 '16 at 22:35
  • Try a restart of the device and also toggling Airplane Mode.
    – Gigabit
    Sep 12 '16 at 22:56
  • tks, pretty sure I treid all that, but I'll have another go.
    – HattrickNZ
    Sep 12 '16 at 23:05

On Android, in addition to using settings. You can still use a third-party application to change DNS. Such as:

  1. DNS Changer | Mobile Data & WiFi | IPv4 & IPv6
  2. Net Optimizer | Optimize Your Internet Speed
  3. DNS Smart Changer - Web content blocker and filter
  4. Faster & Safer Internet
  5. Turbo VPN- Free VPN Proxy Server & Secure Service

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.