Discuss [Req] Binding Domain to certain IP ? at the Free Toolchain Software - Hackint0sh.org; Hello,
I'm wondering how to force the iPhone to resolve a particular domain to a ...
-
[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?
-
-
Senior Professional
Array

Originally Posted by
mcorto
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
-
-
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
-
Senior Professional
Array

Originally Posted by
mcorto
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
-
-
Senior Professional
Array
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!
-
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?
-
-
Senior Professional
Array
-
Senior Professional
Array

Originally Posted by
mcorto
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.
-
-
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?
-
I have the same problem. Has anyone found solution?
-
Similar Threads
-
By mitchellmoxo in forum General
Replies: 2
Last Post: 04-11-2008, 12:14 AM
-
By Richy in forum Flea Market
Replies: 0
Last Post: 03-12-2008, 11:42 AM
-
By Richy in forum Flea Market
Replies: 0
Last Post: 02-22-2008, 09:01 AM
-
By Richy in forum Flea Market
Replies: 0
Last Post: 01-28-2008, 07:22 AM
-
By Richy in forum Flea Market
Replies: 2
Last Post: 12-08-2007, 05:56 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks