Random thoughts shooting out of volatile mind
Tutorial: Sharing 3G Internet Connection Using Laptop Wifi
I've got a new laptop and plan to buy a new internet connection. Since me and my room mate are planning to share the cost of internet we are now faced with a problem of how to share a single datacard connection b/w us. After searhching a lot in the internet came accross this article [1]. But the new isc-dhcp-server package in Debian was not running for some reason so thought of going in my own way using dnsmasq as dhcp and dns server for peer laptop. Below is what I did.

First step is to install dnsmasq. Below is the command for installing the  same for Debian based distro. For other distro please follow your distro documentation

apt-get install dnsmasq
Next step is configuring the dnsmasq as dhcp and dns cache. First rename the original configuration file dnsmasq.conf found in /etc to dnsmasq.conf.orig and create new empty file in place of it

sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo touch /etc/dnsmasq.conf
Now add this to your dnsmasq.conf. 

Modify the file as required. I assume the reader knows basics of dhcp and dns stuffs. If you didn't understand few stuffs ping me or use man page which provides all the information about the commands.

After editing dnsmasq.conf now restart the dnsmasq daemon using following command

sudo /etc/init.d/dnsmasq restart # Debian
sudo /etc/rc.d/dnsmasq restart # Arch
We need to have a small script to enable the internet sharing. This script is originaly taken from [1] I've only enabled the wep encryption to secure the access point



You should run this script as root and once executed you should be able to see the network access point!. Next step is testing B.A.T.M.A.N integration, till then cya..

Reference:
[1] http://www.go2linux.org/linux/2011/03/share-your-3g-internet-connection-over-wifi-linux-ipod-touch-925
[2] http://element.edoceo.com/howto/dnsmasq

Posted by: copyninja on Sunday, 7 August 2011

blog comments powered by Disqus
Fork me on GitHub