This is a rather simple task to accomplish, which allows you to connect via SSH to your Iphone, as well as share your internet connection with it. It's rather simple. The tricky part is to configure the ad-hoc network under linux and then get the IP's correctly on the Iphone WiFi configuration.
Setup:
Iphone 3G
Laptop with WiFi card
Distro: ubuntu x.x
#1: Open your network interfaces file under the PC (Connection Server) with root privileges:
user@laptop$ sudo nano /etc/network/interfaces
#2: Edit it so that you can create an ad-hoc network at networking start:
#ad-hoc wifi
iface eth1 inet static
address 192.168.2.1 # The PC will be the network gateway
netmask 255.255.255.0
wireless-key 1234567890
wireless-mode ad-hoc
wireless-essid myWAN
wireless-channel 6
auto eth1
#3: network restart
user@laptop$ sudo /etc/init.d/network restart
#4 Point out the DNS. Run:
user@laptop$ cat /etc/resolv.conf
point out the address under "nameserver" in a paper, you will need it in the next step.
#5: In the Iphone, open your WiFi network menu and connect to the created network's SSID myWAN that you should now be able to see as available. Input the wireless key. Once connected, select the network and change the IP to static. Input the following:
IP: 192.168.2.10
Subnet mask: 255.255.255.0
gateway: 192.168.2.1
DNS: Value_Of_Step_#4
And that's it. Simple and easy. You can share ethernet or wireless broad band networks with your Iphone easily now under linux. To connect through SSH don't forget to download the SSH necessary package on the Iphone. Have fun!
Sunday, January 11, 2009
Subscribe to:
Posts (Atom)