Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,725 Members 37,861 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How to change DNS on rooted Samsung Galaxy note 3

Tip us?
 
but2ene
Old
(Last edited by but2ene; 25th March 2014 at 02:30 PM.)
#1  
Junior Member - OP
Thanks Meter 1
Posts: 7
Join Date: Oct 2010
Location: Nancy
Prompt [Q] How to change DNS on rooted Samsung Galaxy note 3

Hi everybody !

I have installed openvpn on my rooted galaxy note 3 with kitkat XEF
I can't change the DNS to my private or google DNS. The default dns (4G or wifi) will not accessible from the vpn.

I've tried setprop of all dns options and many apps such as: switchDns, dnsChanger, change my dns,DNSet etc ... nothing
I've tried the button fixdns on openvpn application. It has no effect.

The tools nslookup and firefox can resolve a web site. However all another application have the problem (opera, facebook, foursquade, ...).

When I use DNS lookup, I can set different dns to test it. google has no records with default DNS.
But it found ip with 8.8.8.8 or my private dns with same application.

I don't know why.
It's very frustrating.
Thanks in advance for your ideas.

ps : I'm sorry, but a moderator could move this message un galaxy note 3 QA forum please ? I don't see the delete button to do it myself.
 
but2ene
Old
#2  
Junior Member - OP
Thanks Meter 1
Posts: 7
Join Date: Oct 2010
Location: Nancy
Default [Solved]

Hello, everybody !

I fund the solution of my problem.

In fact the galaxy note 3 (and another product, I guest) have hotspot in 192.168.43.0/16.

Even if it is disabled, my phone can't resolve with 192.168.43.1 dns ip. This ip was my first vpn dns.
I suppose that is hard coded somewhere as one of dns. Because my search with grep returns many binary files and my openvpn log and ping of this ip receives nothing, when the hotspot is off.

Maybe it special thing due to the samsung overlay. Because this configuration has work for my HTC Desire HD.

Anyway, I changed my network address in vpn and it magicaly works.

I hope this problem and this solution can be helpfull.
Good bye.
 
d8d8up
Old
#3  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Quote:
Originally Posted by but2ene View Post
Hello, everybody !

I fund the solution of my problem.

In fact the galaxy note 3 (and another product, I guest) have hotspot in 192.168.43.0/16.

Even if it is disabled, my phone can't resolve with 192.168.43.1 dns ip. This ip was my first vpn dns.
I suppose that is hard coded somewhere as one of dns. Because my search with grep returns many binary files and my openvpn log and ping of this ip receives nothing, when the hotspot is off.

Maybe it special thing due to the samsung overlay. Because this configuration has work for my HTC Desire HD.

Anyway, I changed my network address in vpn and it magicaly works.

I hope this problem and this solution can be helpfull.
Good bye.
Hi there, just want to share my thoughts on this as well.

i am on RR kitkat ROM (SGS2), i had a related issue in that it has hard coded 8.8.8.8 as DNS and as a result, i can not use most open/free wifi, the authentication/term and condition page will not come up...
with some research, i found that in /system/etc/dhcpcd/dhcpcd-hooks/, there is this file called 20-dns.conf, in there, you may find there are 2 line similar to this

setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4

once i remove these lines, public wifi works for me again. not too sure why this was done in some custom ROMs of late...
 
d8d8up
Old
#4  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Quote:
Originally Posted by d8d8up View Post
Hi there, just want to share my thoughts on this as well.

i am on RR kitkat ROM (SGS2), i had a related issue in that it has hard coded 8.8.8.8 as DNS and as a result, i can not use most open/free wifi, the authentication/term and condition page will not come up...
with some research, i found that in /system/etc/dhcpcd/dhcpcd-hooks/, there is this file called 20-dns.conf, in there, you may find there are 2 line similar to this

setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4

once i remove these lines, public wifi works for me again. not too sure why this was done in some custom ROMs of late...
just to show the whole of this file, here it is, note line 20 and 20, if you # it out, it should use the default gateway, or change it so it use one you prefer:
# Set net.<iface>.dnsN properties that contain the
# DNS server addresses given by the DHCP server.

set_dns_props()
{
case "${new_domain_name_servers}" in
"") return 0;;
esac

count=1
for i in 1 2 3 4; do
setprop dhcp.${interface}.dns${i} ""
done

count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${interface}.dns${count} ${dnsaddr}
count=$(($count + 1))
done

setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.8.4
}

unset_dns_props()
{
for i in 1 2 3 4; do
setprop dhcp.${interface}.dns${i} ""
done
}

case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT) set_dns_props;;
EXPIRE|FAIL|IPV4LL|RELEASE|STOP) unset_dns_props;;
esac
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes