Edit hostfile ipod touch

hello,

How can i edit the hostfile of the ipod touch.

in a standard computer you can edit the hostfile by editing the .txt file.
for example how can i add this in to that file?
192.168.0.100 testserver

Ipod, iOS 4

Posted on Mar 31, 2011 8:03 AM

Reply
8 replies

Apr 4, 2011 4:25 AM in response to Guy In AZ

We added this server name on our linux system that host the website.
+ we added a virtual server in our dhcp server to link the ip-adres.
+ we also tryed some test that the dhcp forward the ip-adres to the ipod.
All this is no succes.

We are doing some test to use they ipod as a tool for our production, so that the acces the information in the factory.
Why did i chose the ipod because: it is a very fast system + high screen resolution, and nice to work with.

If it works then all our chefs will be equiped with a ipod touch.

kr,

Dieter

Apr 4, 2011 4:14 PM in response to Dieterfom

Putting the server name on your Linux server isn't going to work. You still need a local nameserver for the iPod to resolve the IP address.

See http://tldp.org/HOWTO/DNS-HOWTO-3.html for info how to set one up. Your Linux distro probably already comes with named. You just have to turn it on and configure it.

I'm not sure what adding a virtual server to your dhcpd server will do for you. You must be assigning some ip address to the iPod or nothing at all would work. The issue isn't getting a certain IP address on the iPod, it's getting the iPod to resolve http://testserver/ to http://192.168.0.100. The only thing you need to do is edit dhcpd.conf to give clients the IP address of the nameserver.

Add this to the subnet{} section of dhcpd.conf to tell clients to use the local nameserver:
option domain-name-servers 192.168.0.100;

(You might want to ensure your AP isn't giving out IP addresses, too. Make sure
the Linux server is handling dhcp by disabling dhcp on the wireless router/AP.)

After that is set up you will need the following in your dhcpd.conf:
option domain-name "domain.local";

That will allow you to use http://testserver/ in the iPod without the iPod trying to rewrite it into testserver.com.

Also see:
man named
man named.conf
man dhcpd
man dhcpcd.conf

But if you are just prototyping at this point it might be easier to search/replace the web pages and change the server name to the IP address.

Jun 7, 2011 12:06 PM in response to Dieterfom

Simple solution:


the hostfile is located at: /etc/hosts


To edit this file you need to SSH into your device, If you know how to do this directly just use vi, or nano to edit the file. From windows use WinSCP to access the file system via FTP(SSH). Then simply navigate to /etc/hosts download the file to your desktop, right click and open it with note pad, add your resolver to the last line "192.168.0.100 testserver", save, and replace the original file with the new one.




/etc/host -- example config

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting. Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

192.168.0.100 testserver


*To SSH into an ipod it must have OpenSSH installed, usually this requires a jailbreak.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Edit hostfile ipod touch

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.