Tools

Neva said

Neva  

Sharing an internet connection obtained by tethering a 3G phone to everyone within WLAN range - somewhat complicated.

13 comments

Neva posted to #linux 10.07.2010 (en)

13 comments

Bottom

Neva  

Situation in the beginning: An Acer Aspire One ZG5 laptop with an Atheros WLAN chipset, a Nokia E63 phone with flatrate 3G data and some situations where multiple users should reach the net and there isn't a local wlan network.

Vision: to tether the laptop to internet via bluetooth and 3G, then share the connection via wlan master mode to other computers in range.

Neva commented on posted to #linux 10.07.2010 (en)

ninnnu  

At least Ubuntu's NetworkManager has "Create a new wireless network..."-option that does exactly that, although it uses ad-hoc mode instead of master (although I'm not sure if Atheros supports adhoc...). Also, you need Blueman to tether via BT because Nokia.

ninnnu commented on posted to #linux 11.07.2010 (en)

Neva  

Starting with the need to bridge the connections gained via bluetooth and wlan, the kernel needs iptables to masquerade and forward packets. Linpus default kernel doesn't have the iptables module and the proprietary drivers make compiling a new kernel difficult. So off to look at other distros..

http://www.howtoforge.com/internet-co...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

I can connect to the network via bluetooth just fine in Linpus, after installing bluetooth drivers and the gnome-ppp dialer. With a helper script, even finding out and setting the right bluetooth communication channel in /etc/bluetooth/rfcomm.conf is easy.

http://arcadia.anime.fi/~n/aspireone/...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

Made a bootable Fedora 10 USB stick with persistent storage. That means that not only can I run the computer from the stick, any changes I make or additional programs I install stay on the stick.

https://fedorahosted.org/liveusb-crea...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

Could connect to the net in Fedora with wvdial, after fixing a bug that prevented DNS from working ( /etc/resolf.conf wasn't updated ):

http://beaveryoga.wordpress.com/2009/...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

Fedora 10 didn't have a new enough kernel version (2.6.31 or better) for setting the Atheros WLAN chip into master mode with hostapd. Time to try the next distro.

http://soad1982.blogspot.com/2010/04/...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

Made a bootable Ubuntu Lucid Lynx 10.04 USB stick with Unetbootin. It has a fresh enough kernel for hostapd, but no persistent storage. Using one directory on the laptop's ssd drive for quick setup scripts.

http://unetbootin.sourceforge.net/

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

By creating a few ppp files in Ubuntu, could connect to the net via bluetooth with pon (and disconnect with poff).

http://www.spiration.co.uk/post/1307/...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

For the forwarding firewall, this seems like a promising candidate to quickly generate the proper settings:

http://easyfwgen.morizot.net/gen/

Also, a nice graph on iptables "moving parts":
http://www.billauer.co.il/ipmasq-html...

Neva commented on posted to #linux 11.07.2010 (en)

Neva  

Learned a few things:
Bridging the connections is not an option when network is provided over a ppp connection, since it can't offer many ip addresses. Nat is the viable option then.

Fedora 13 has a new enough kernel and pre-compiled hostapd to use Atheros in master mode.

New networkmanagers in Fedora and Ubuntu are smart enough to do the forwarding / natting automatically via GUI tools, as long as the interfaces have been brought online.

Neva commented on posted to #linux 12.08.2010 (en)

Neva  

Success!!

1. Boot laptop with Fedora 13 usb stick ( https://fedorahosted.org/liveusb-crea... )
2. Tether the phone's 3G connection. Cable is preferred, less hassle than bluetooth and you need to charge it anyway because of the 3G power drain. Connect cable, select wide area network from networkmanager
3. Create a new wireless network with Network manager. The rest is done automatically (dhcp server, nat forwarding).
4. Use other wlan-capable devices to connect to your new network

This will create an ad-hoc wlan that's routed to the existing ppp network connection.

Neva commented on posted to #linux 12.08.2010 (en)

Neva  

Some relevant links and info:
http://swiss.ubuntuforums.org/showthr...
http://wiki.archlinux.org/index.php/S...

/etc/hostapd/hostapd.conf:



ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel

# Some usable default settings...
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0

# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211

# Customize these for your local configuration...
interface=wlan0
hw_mode=g
channel=2
ssid=FreePKWlan

Neva commented on posted to #linux 12.08.2010 (en)

Login or register to leave a comment

Publicity
These messages are public and can be seen by anyone.