I'm on KitKat Cyanogenmod 11, meaning I'm rooted by default. Despite that I can only report failure:
1st method:
When I try the adb shell
with
setprop net.rmnet0.dns1 208.67.222.222
setprop net.rmnet0.dns2 208.67.222.222
setprop net.rmnet1.dns1 208.67.222.222
setprop net.rmnet1.dns2 208.67.222.222
setprop net.rmnet2.dns1 208.67.222.222
setprop net.rmnet2.dns2 208.67.222.222
setprop net.dns1 208.67.222.222
setprop net.dns1 208.67.222.222
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).
When doing
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]:
And in /system/etc/dhcpcd/dhcpcd.conf
I removed the parameter to accept resolvers at DHCP negociation. No success either.
3th method:
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.
Resume:
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?