Remove All Ads from XDA

[Q] Custom DNS settings

6 posts
Thanks Meter: 0
By siloportem, Junior Member on 13th March 2014, 02:06 PM
Post Reply Email Thread

I am currently trying to find a way to change the DNS settings on my S II. I want to implement the posibillity to set the DNS IP in the settings of my cyanogenmod ROM.
But it seems like its impossible to set a custom DNS for mobile networks on the SII.

I found out that Android stores its DNS settings as properties.
- net.dnsX for the current active DNS
- and also dhcp.wlan0.dnsX when connected to WiFi,
- or net.rmnet0.dnsX when connected to a mobile network.

I was able to change this settings manually with the "setprop" utility and also automatically by modifying "20-dns.conf" from dhcpcd for WiFi and "" for mobile networks.

For WiFi this works without any problems, but for mobile networks these settings seem to be ignored completely. Android still uses the DNS settings from my provider. I was searching through the complete android source to find an indication where the dns settings are stored that are actually used, but I have found nothing.

First I thought my provider is routing all requests to port 53 to their own servers but even if I set the DNS address to, all requests are still resolved.

Has anyone tried this before or even sucsessfully changed the DNS settings for mobile networks on the S2?
I belive the DNS settings for mobile networks are handled in some binary blobs (from Samsung?), maybe

Does anyone have what I can do?
While searching through the net I found out that this is working for other devices, so I dont really understand why samsung would ignore the properties in their code.

Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes