This article is very old and the method is not recommended any more.
Connectify-me has been so popular among the Windows users. It allows you to create Wireless hotsopt and share your internet connection. That's amazing because, now a days portable devices are easily available and most of them are wi-fi capable. Unfortulately, there is nothing completely baked for doing the same thing. However it is not that hard to do it on linux. in fact, it is even easier. So let's get started.
We'll have to install these packages :
to install them, type these command in debian based distributions (Debian, Ubuntu, Mint, Zorin, Knoppix)
sudo apt-get install hostapd dhcp3-server
In arch , type these commands:
sudo pacman -Sy hostapd
sudo pacman -Sy dhcp
This script also depends on python 2.7 which comes preinstalled in most cases. if you Don't have python by default, install it with your package manager.
Download the Zip file attached with this post. and extract it in your home folder.
you will have a folder named hostapd-python-script in your home folder.
open up terminal, go to the directory by typing :
ifconfig to list all your network interfaces, and then identify the device that's providing you internet. (You'll find a inet-address) associated with it. Mine looks something like this:
eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::cad1:5eff:fe42:ab86/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66807 errors:0 dropped:0 overruns:0 frame:0
TX packets:56193 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:66738188 (66.7 MB) TX bytes:7257406 (7.2 MB)
So, My eth1 [ethernet adapter] is providing me internet. in your case, it can be eth0 or any other device. take a note of the device name.
now run this command in the terminal(after reading the text below this command):
sed -i 's/eth0/eth1/' config.py >>newconfig.py && rm config.py && mv newconfig.py config.py
Looks confusing? well it does nothing but replaces all eth0 with eth1 in
config.py . you can do it manually as well. and Be careful dude the above command may be different for you. My device is eth1 , if your device is eth0, then leave it as is and don't run the command. and if it is something else, then change the command. You'll have to change the starting part, i mean the
sed 's/eth0/eth1/' part. just replace eth1 (the replace string) with your device name and then run the whole command.
phew!! tired? a few steps left. I promise.
now change the permisson of the file
hostapd.py and make it executable by running this command
chmod +x hostapd.py
this script requires superuser permisson, so start your own hotspot by typing (make sure your wi-fi is on and not connected to anything):
sudo ./hostapd.py start
If everything goes well, you'll see a wi-fi network with your phone titled test the default security key is foobar123 .
however you can change the name and the key in the file
to stop the server, type :
sudo ./hostapd.py stop
Happy sharing :)
feel free to add comment, if you get stuck or if you find it useful