Linux iPhone Tethering scripts

Seeing how inconvenient the whole tethering process is, I decided to simplify it with these scripts. You will probably want to keep the SUID bit on these, or use sudo and set it up to not ask for a password for this command. Be sure to replace wlan0 with your wifi interface.
In order for these to work properly, you must not have your card set in “roaming mode” by network-admin.

The scripts:

adhoc (switches wlan card into adhoc mode)

#!/bin/bash
#switches card into adhoc mode and sets up adhoc network
iwconfig wlan0 key off #this disables WEP. If you want WEP, read the iwconfig man page and change this line.
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid ubuntu #replace this with your preferred ssid
ifconfig wlan0 192.168.1.112 #replace this with your preferred IP address. Be sure to give the phone an address that is in the same /24 subnet.

This entry was posted
on Thursday, October 2nd, 2008 at 16:22 and is filed under linux.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.