Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Lean Mean Battery Power Saving App Review

We talk a lot about battery topics here at XDA TV. We talk about everything from Power Banks to USB … more

Android 5.1 Possibly Coming February 2015

Google released Android 5.0 just over a month ago, and since then Lollipop has been trying to … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Help! Changing DNS settings

OP tiptoekirk

21st February 2010, 07:04 PM   |  #1  
OP Senior Member
Flag Charlotte
Thanks Meter: 12
 
169 posts
Join Date:Joined: Feb 2007
More
I need to change the DNS settings for a connection I use a lot that is managed by company who has setup OpenDNS to block a lot of stuff...

How can I go about doing this on a wpa encrypted wireless network where i do no not have a dynamic ip address?? It seems it only supports changing a DNS server when the phone is setup dynamically.. I need it to work on DHCP, I just need the DNS server changed, i dont need or want a dynamic ip..

HELP!
21st February 2010, 11:39 PM   |  #2  
henihazbay's Avatar
Member
Thanks Meter: 3
 
71 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by tiptoekirk

I need to change the DNS settings for a connection I use a lot that is managed by company who has setup OpenDNS to block a lot of stuff...

How can I go about doing this on a wpa encrypted wireless network where i do no not have a dynamic ip address?? It seems it only supports changing a DNS server when the phone is setup dynamically.. I need it to work on DHCP, I just need the DNS server changed, i dont need or want a dynamic ip..

HELP!

This is the code needed to change the DNS settings. Just connect your N1 to your PC and open command in your PC then;

adb shell setprop net.dns1 8.8.8.8

adb shell setprop net.dns2 8.8.8.4
22nd February 2010, 08:30 AM   |  #3  
OP Senior Member
Flag Charlotte
Thanks Meter: 12
 
169 posts
Join Date:Joined: Feb 2007
More
Quote:
Originally Posted by henihazbay

This is the code needed to change the DNS settings. Just connect your N1 to your PC and open command in your PC then;

adb shell setprop net.dns1 8.8.8.8

adb shell setprop net.dns2 8.8.8.4

That did not seem to do it... I tried several times with wifi on and off and even restarted the phone.. any other ideas??
22nd February 2010, 03:06 PM   |  #4  
Junior Member
London
Thanks Meter: 0
 
6 posts
Join Date:Joined: Jan 2008
More
Quote:
Originally Posted by tiptoekirk

I need to change the DNS settings for a connection I use a lot that is managed by company who has setup OpenDNS to block a lot of stuff...

How can I go about doing this on a wpa encrypted wireless network where i do no not have a dynamic ip address?? It seems it only supports changing a DNS server when the phone is setup dynamically.. I need it to work on DHCP, I just need the DNS server changed, i dont need or want a dynamic ip..

HELP!

Not sure if i get that... When you use static ip there is a section that allows you to specify the DNS... not sure what you mean The problem as i see it, is that there is no easy way (via android GUI) of changing DNS if you use DHCP

Anyways... try...

adb shell setprop dhcp.eth0.dns1 <IP>
adb shell setprop dhcp.eth0.dns2 <IP>
etc

This will only change the DNS server. If you know shell scripting, You could make this more permanent by editing :

/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf

If that works, and you are unfamiliar with shell scripting, then post some conditions (i.e SSID of network, gw of network etc) and i'll see if i can knock something up for you.

Hope that helps
22nd February 2010, 03:53 PM   |  #5  
OP Senior Member
Flag Charlotte
Thanks Meter: 12
 
169 posts
Join Date:Joined: Feb 2007
More
Quote:
Originally Posted by yasn77

Not sure if i get that... When you use static ip there is a section that allows you to specify the DNS... not sure what you mean The problem as i see it, is that there is no easy way (via android GUI) of changing DNS if you use DHCP

Anyways... try...

adb shell setprop dhcp.eth0.dns1 <IP>
adb shell setprop dhcp.eth0.dns2 <IP>
etc

This will only change the DNS server. If you know shell scripting, You could make this more permanent by editing :

/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf

If that works, and you are unfamiliar with shell scripting, then post some conditions (i.e SSID of network, gw of network etc) and i'll see if i can knock something up for you.

Hope that helps

Yes i am wanting to just change the DNS server that my phone uses when connecting to wifi but i cant set it up dynamically so i am forced to keep it dhcp.

i tried the way you said and it didn't do it.. this android stuff is new to me.. after i type in that command in it does not say anything.. i have rooted and unlocked my nexus one and pretty good with computers but this linux stuff is another ballgame..

ive done some dos scripting back in the day, is this anything similar? what other info would u need from me to create the file? SSID, password, ??

THANKS!
20th June 2010, 11:39 PM   |  #6  
white^rabbit's Avatar
Member
Flag Verona
Thanks Meter: 0
 
96 posts
Join Date:Joined: Mar 2010
More
How to set the dns for the mobile internet connection?! I wanna use FoolDNS in place of Google DNS.. Because with froyo 2.2 and flashplayer we see allllllll the advertising on web and navigation becames much slower:)
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes