I'm on KitKat Cyanogenmod 11, meaning I'm rooted by default. Despite that I can only report failure:
When I try the
adb shell with
setprop net.rmnet0.dns1 18.104.22.168 setprop net.rmnet0.dns2 22.214.171.124 setprop net.rmnet1.dns1 126.96.36.199 setprop net.rmnet1.dns2 188.8.131.52 setprop net.rmnet2.dns1 184.108.40.206 setprop net.rmnet2.dns2 220.127.116.11 setprop net.dns1 18.104.22.168 setprop net.dns1 22.214.171.124
and then test to which IP hjfdkhfjkyuiwnwetbyebvtwgqwdi.tk resolve's... I get an NXDOMAIN response, meaning it didn't came from the OpenDNS nameserver I've set (which would return an answer with an alternative IP, to serve you adds).
getprop | grep dns
I would only see what I've configured. However when switching from WiFi to mobile (3G or 4G/LTE) I see IP's that I recognize as being assigned to my mobile carrier. Apps like "DNSwitch" or "DNS Changer" can re-set those resolvers automaticly at network change. However what
getprop reports me, is still not what's truly doing the resolving.
2nd method [a]:
Another way I tried, is modifieng
/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf an set things fixed in there (but be aware network names and number of resolvers can differ). Without success.
2nd method [b]:
/system/etc/dhcpcd/dhcpcd.conf I removed the parameter to accept resolvers at DHCP negociation. No success either.
So far the only thing that would work a little is using a "poor man VPN", using the app "SSH Tunnel", using SOCKS4, but using that I did not exactly got a good result.
It seems like either DNS set elsewhere, or all are forwarded (hijacked) as soon the network is mobile.
So, how come? Is it another dirty way to provide carriers with a tool to demolish network neutrality?
In your case your question was because of that. Do you have SSH to try if SSHTunnel is a alternative solution to get around your carriers censoring?