Page 1 of 2 12 LastLast
Results 1 to 10 of 13
Discuss [Req] Binding Domain to certain IP ? at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Hello, I'm wondering how to force the iPhone to resolve a particular domain to a ...
  1. #1
    Professional Array

    Join Date
    Jul 2007
    Posts
    91
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Default [Req] Binding Domain to certain IP ?

    Hello,

    I'm wondering how to force the iPhone to resolve a particular domain to a desired ip.
    In windows that's pretty simple, just editing the hosts file. But in the iPhone it doesn't seem to work (I even restarted it).

    Googling for info shows that the hosts file in OS X isn't really used. Instead NetInfo seems to do its job. But on the iPhone there isn't any NetInfo app. I'm a bit confused.

    Can anyone help me please?



  2. #2
    Senior Professional Array

    Join Date
    Aug 2007
    Location
    Budapest, Hungary
    Posts
    248
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    19

    Default

    Quote Originally Posted by mcorto View Post
    Hello,

    I'm wondering how to force the iPhone to resolve a particular domain to a desired ip.
    In windows that's pretty simple, just editing the hosts file. But in the iPhone it doesn't seem to work (I even restarted it).

    Googling for info shows that the hosts file in OS X isn't really used. Instead NetInfo seems to do its job. But on the iPhone there isn't any NetInfo app. I'm a bit confused.

    Can anyone help me please?
    Hi. As I dont have the iPhone at hand yet, I dont know for sure, but in Linux (much like OS X I assume) the file it /etc/resolv.conf

    You just put an IP and a Domain

    1.1.1.1 hello.abc

    Of course this may be very wrong, but worth to look at,

    Ben

  3. #3
    Professional Array

    Join Date
    Jul 2007
    Posts
    91
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Default

    Hi,

    thanks but I think resolv.conf is used just for DNS:

    http://ka1fsb.home.att.net/resolve.html

    It just stores the domain name servers to resolve domain names into IPs.
    This means I could set up my own DNS server and then edit hosts.conf there. But I don't wanna format my hd installing a server OS. Is there a simpler way? Something like hosts?

    Thanks

  4. #4
    Senior Professional Array

    Join Date
    Aug 2007
    Location
    Budapest, Hungary
    Posts
    248
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    19

    Default

    Quote Originally Posted by mcorto View Post
    Hi,

    thanks but I think resolv.conf is used just for DNS:

    http://ka1fsb.home.att.net/resolve.html

    It just stores the domain name servers to resolve domain names into IPs.
    This means I could set up my own DNS server and then edit hosts.conf there. But I don't wanna format my hd installing a server OS. Is there a simpler way? Something like hosts?

    Thanks
    You are totally right,

    I mean to say /etc/hosts

    at least on a Linux system,

    This is how mine looks, might give you a hint:

    Code:
    127.0.0.1       YOURSYSTEMNAME    localhost.localdomain
    localhost
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
    
    ### Inside Internal Domains
    
    10.10.81.1     hp2300n
    10.10.81.2     hp2500n
    In this example you can see that I use hp2300n as a name which resolves to 10.10.81.1

    This I use as those names are not public, only internal, and this machine is a Proxy server, so all stations behind it will pick these names up.

    Check if the iPhone has an /etc/hosts file, and if it does, just edit it.

    Cheers

    Ben

  5. #5
    Senior Professional Array dogzilla's Avatar

    Join Date
    Aug 2007
    Location
    Boston
    Posts
    106
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    There is an /etc/hosts file on the iPhone, but I suspect it's vestigial. I just tried editing it to block intellitxt and another ad server, but was still able to reach them even after restarting the iPhone. There's something else that handles the dns resolution.

    Sure would be nice to block those ads.
    "Are you into S&M?"
    "Well...I'm a Red Sox fan. Does that count?"
    Go Sox!


  6. #6
    Professional Array

    Join Date
    Jul 2007
    Posts
    91
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Default

    Hi,

    after investigating a bit deeper, I found out the file "hosts" is actually used.
    It seems to be used from BSD Subsystem utilities and all 3rd-party applications.
    But it's not used by Safari.

    What if I would want to redirect a connection to an IP to another IP inside my LAN?

  7. #7
    Senior Professional Array

    Join Date
    Aug 2007
    Location
    Budapest, Hungary
    Posts
    248
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    19

    Default

    Well, Safari on MACs use the hosts file I think, as in Linux Firefox does the same, etc. I dont have an iPhone yet so its hard for me to guess. I will have it soon, then the hacking begins as time permits,

    Cheers

    Ben

  8. #8
    Senior Professional Array

    Join Date
    Aug 2007
    Posts
    227
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    18

    Default

    Quote Originally Posted by mcorto View Post
    Hello,

    I'm wondering how to force the iPhone to resolve a particular domain to a desired ip.
    In windows that's pretty simple, just editing the hosts file. But in the iPhone it doesn't seem to work (I even restarted it).

    Googling for info shows that the hosts file in OS X isn't really used. Instead NetInfo seems to do its job. But on the iPhone there isn't any NetInfo app. I'm a bit confused.

    Can anyone help me please?

    For now you are going to have to use either

    a) your own DNS server configured to act authoritatively for the domain you are trying to connect to

    b) the IP address itself.

    The BSD subsystem apps use the /etc/hosts file, however other the apps use an internal netinfo resolver which defaults to DNS.

  9. #9
    tji
    tji is offline
    Newbie Array

    Join Date
    Sep 2007
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I just ran into this same issue.. I tried pointing the hostname for a banner ad provider to 127.0.0.1, so my sports score tracking site would update quicker (bypassing those two large banner ads which update on every refresh cycle). But, Safari doesn't appear to use /etc/hosts.

    What I've found so far:

    - other apps use /etc/hosts. "ping testname.com" from an ssh shell works find (where testname.com is in the /etc/hosts file.
    - I thought it might be caching DNS lookups, but I made up a hostname, put it in /etc/hosts, and pointed it at my Linux box. Safari ignored that, and resolved it to a internet IP address.
    - I cleared the cache, history, and cookies on Safari -- no change.
    - Safari on Mac OS X works as expected, and uses /etc/hosts.
    - I sniffed the traffic on the iPhone, and saw its DNS requests for the various hosts. They looked normal.. nothing weird going on, other than ignoring /etc/hosts.

    Some thoughts:

    - In some other OS's, you can set the priority for lookup types. Like in Solaris, nsswitch.conf configures this. "hosts: files dns" tells it to look in hosts first, then check DNS. I did not find anything like this in the iPhone.

    - There is a process "mDNSResponder" running on the iPhone. This is a multicast DNS responder. I think it's typically used for Bonjour advertising services on the LAN. As far as I know, it's not used for standard DNS. But, who knows...


    Any ideas?

  10. #10
    Newbie Array

    Join Date
    Jan 2008
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I have the same problem. Has anyone found solution?


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. I have a spair domain, what shall i use it for?
    By mitchellmoxo in forum General
    Replies: 2
    Last Post: 04-11-2008, 12:14 AM
  2. FS: iPhoneHacks.net (Domain Name)
    By Richy in forum Flea Market
    Replies: 0
    Last Post: 03-12-2008, 10:42 AM
  3. [WTS] iPhoneHacks.net (domain name)
    By Richy in forum Flea Market
    Replies: 0
    Last Post: 02-22-2008, 08:01 AM
  4. [Domain Name] iPhoneHacks.net
    By Richy in forum Flea Market
    Replies: 0
    Last Post: 01-28-2008, 06:22 AM
  5. [FS] [Domain Name] iPhoneHacks.net
    By Richy in forum Flea Market
    Replies: 2
    Last Post: 12-08-2007, 04:56 AM

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 02:07 PM.
twitter, follow us!