Sharing a 3G connection with Ubuntu
Seeing as I carry around a vast array of equipment, in my massive, 10Ton backpack, I normally have a 3G card at hand. If I'm visiting someone who doesn't have broadband themselves, or I'm sitting in a Coffee Shop with other laptop-lugging friends I might want to share my 3G connection with friends, via WiFi. (assuming I have a data bundle that month, or they understand the horrific 3G data pricing)
I wrote a little script to make this easy
- It's clearly Atheros-specific, but I've included more generic commands in comments. Obviously interface names would need to be changed
- I dial the 3G connection before I run this, and disconnect afterwards, but it would be trivial to change that...
- My
dnsmasq.conf
contains only the linedhcp-range=10.42.42.10,10.42.42.254,12h
- Dnsmasq is configured not to run on startup, via
update-rc.d
/usr/local/sbin/3g-ap
: