Page 1 of 2 12 LastLast
Results 1 to 10 of 14
Discuss How to change DNS's of iPhone? at the General - Hackint0sh.org; How to change the DNS servers of a jailbroken iPhone? There are restrictions to accessing ...
  1. #1
    Rookie Array

    Join Date
    Jun 2010
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default How to change DNS's of iPhone?

    How to change the DNS servers of a jailbroken iPhone? There are restrictions to accessing some sites(including Youtube and some Google sites) in the country I live. So changing DNS servers is the first thing I do in a fresh OS install. Now I need to change the DNS servers of iPhone for 3G and Wifi. But how? Also is there any good text editor for the terminal like "nano"? Thanks.



  2. #2
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    Quote Originally Posted by Antarktikali View Post
    How to change the DNS servers of a jailbroken iPhone? There are restrictions to accessing some sites(including Youtube and some Google sites) in the country I live. So changing DNS servers is the first thing I do in a fresh OS install. Now I need to change the DNS servers of iPhone for 3G and Wifi. But how? Also is there any good text editor for the terminal like "nano"? Thanks.
    You do this via the iPhone's Settings app.
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!

  3. #3
    Rookie Array

    Join Date
    Jun 2010
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Settings app? How? I don't own a iPhone, I checked for DNS settings today on my GF's iPhone but couldn't find it. By the way I may need to edit the /etc/hosts file. How can I do this? I can't think of an easier solution than doing it via ssh...

  4. #4
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    Quote Originally Posted by Antarktikali View Post
    Settings app? How? I don't own a iPhone, I checked for DNS settings today on my GF's iPhone but couldn't find it. By the way I may need to edit the /etc/hosts file. How can I do this? I can't think of an easier solution than doing it via ssh...
    I already gave you the answer, you don't need to be jailbroken or use SSH or any of that to change the DNS on an iPhone. Sounds like you are trying to over complicate a very simple task.
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!

  5. #5
    Rookie Array

    Join Date
    Jun 2010
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Yeah maybe lol as I said I don't have an iPhone. But what about the hosts file? I don't think you can add hosts with settings app...


  6. #6
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    Quote Originally Posted by Antarktikali View Post
    Yeah maybe lol as I said I don't have an iPhone. But what about the hosts file? I don't think you can add hosts with settings app...
    The hosts file is used to override the name resolution for specific hosts. It is NOT the correct place to change the DNS servers in any operating system I have ever used. That is what you actually asked for I believe.

    In fact, even though iOS/OS X is unix based, many of the legacy text files are overriden with more flexible abstractions. This is true for networking (including DNS).

    So - either use the Settings GUI (which is on the home screen of every iPhone out of the box) or jailbreak and use scutil from the command line - see AFP548 - Using scutil to set DNS server for details.
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!

  7. #7
    Rookie Array

    Join Date
    Jun 2010
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Yes I know, I will not edit the hosts file for changing the DNS. In some cases changing DNS is not enough to access youtube here. So I need to enter the IP's and domain of youtube to the hosts file. Sorry for bothering you btw

  8. #8
    Super Moderator Array n1ckn4m3's Avatar

    Join Date
    Mar 2009
    Location
    USA
    Posts
    2,717
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    145

    Default

    Quote Originally Posted by Antarktikali View Post
    Yes I know, I will not edit the hosts file for changing the DNS. In some cases changing DNS is not enough to access youtube here. So I need to enter the IP's and domain of youtube to the hosts file. Sorry for bothering you btw
    OK, so what you're trying to do is to add a static DNS entry to the phone locally?

    If that's the case, it *is* possible to do this, once you have root filesystem access you can modify /etc/hosts

    That said, I had some trepidation about posting this in response to your questions as modifying the hosts file on the iPhone incorrectly can cause many more problems than you're dealing with right now and I'm still not 100% certain what problem you have that you'll be solving by statically assigning a DNS entry that links youtube.com to its IP address.

    Do you mind elaborating on what the YouTube issue you're having is in hopes of finding an alternate solution? In the 3 years I've been using my iPhone, I've never seen a single instance that someone really needed to modify the hosts file. Not saying that you can't be the first one, but the answer really is that if you're having a resolution problem, just statically adding the route to the hosts file is likely not going to solve the problem. The DNS issue would be indicative of another issue you may be having.

    Though I did give you the answer above, I still wouldn't recommend using it unless you're 100% certain you know what you're doing and that this is the only way to do it. Standard warnings apply, back up your phone, make a back up of the hosts file beforehand, etc.
    The preceding forum post has been brought to you by the letter "N" and the number 42.

    iPhone 4, 32GB (iOS 6.1.2 | evasi0n | SHSH: 4.0 - 6.1.2)
    iPad 2 3G, 64GB (iOS 6.1.2 | evasi0n
    |
    SHSH: 4.3 & 4.3.3 - 6.1)

    Restore problems? Read this: http://www.hackint0sh.org/f137/130802.htm

    Did we solve your problem? Got a dollar or two spare? Please Donate!


  9. #9
    Rookie Array

    Join Date
    Jun 2010
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    BBC NEWS | Europe | Turkish court bans YouTube access

    That is the reason for changing DNS... It's still banned. And not only youtube.com, you can't access to some google sites because they use the same IP! I hate this government... Anyway, what can I use to edit the file on the phone? I got root access, but don't have any text editor on the terminal(like pico, or nano). Any ideas?

  10. #10
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    Quote Originally Posted by Antarktikali View Post
    BBC NEWS | Europe | Turkish court bans YouTube access

    That is the reason for changing DNS... It's still banned. And not only youtube.com, you can't access to some google sites because they use the same IP! I hate this government... Anyway, what can I use to edit the file on the phone? I got root access, but don't have any text editor on the terminal(like pico, or nano). Any ideas?
    I still recommend trying openDNS or google's DNS servers first. You could also try a VPN external to Turkey. These options don't require jailbreak.

    Otherwise if you MUST bypass DNS - here is how to do so.

    SSH into your jailbroken iPhone (remember to also change the root password to prevent virus/worms infecting your iPhone via SSH)

    As root run:
    Code:
    echo "208.65.153.253 www.youtube.com" >> /etc/hosts
    The IP address might not be right - you need to check this but I just tested this command on my iPhone and it added the line correctly. You also might need a few more lines to cover all youtube related addresses.

    To remove this (when they eventually lift the ban) run:
    Code:
    cat /etc/hosts | grep -v youtube > /etc/hosts
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. [iphone 3g]- How do i change mtu?
    By heppy in forum iPhone 3G
    Replies: 3
    Last Post: 08-12-2008, 09:06 PM
  2. Replies: 16
    Last Post: 12-12-2007, 12:35 PM
  3. Replies: 2
    Last Post: 11-30-2007, 07:33 PM
  4. What Could Be Add/Change In The iPhone ??
    By vexta in forum General
    Replies: 5
    Last Post: 09-04-2007, 11:19 PM
  5. How to change iPhone's name?
    By parkertseng in forum General
    Replies: 3
    Last Post: 08-21-2007, 07:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 04:08 PM.
twitter, follow us!