Menu

Home

Prahlad Yeri

What is pyforward?
pyforward is a GUI program that integrates iptables, dnsmasq and hostapd into a single application that makes it possible to turn your linux machine into a virtual wifi access point. For more details on how this works internally, refer to my article here: http://prahladyeri.wordpress.com/2013/05/26/how-to-turn-your-linux-machine-into-a-wifi-access-point/

wifi access point

What are the prerequisites to run pyforward?
1. Python Interpreter - This is included with most linux distributions.
2. iptables - This is an integral part of linux.
3. dnsmasq - This comes with NetworkManager in most distributions. If not, you can easily install it.
4. hostapd - This doesn't come by default, but easily installable.

Does my wireless card support infrastructure mode?
It is very important that your wireless card support infrastructure mode in case you want to communicate with devices that support wifi only in this mode (most android phones support infrastructure mode only).
To find out whether your hardware supports this mode, just issue the below command on your linux command line:

modinfo athxyz | grep ‘depend’

Note: replace athxyz with your kernel driver module. To find out issue:

lspci -k | grep -A 3 -i “network”

As a side note, I'm planning to incorporate this whole process as part of pyforward program itself pretty soon.

How to run the software?
Just extract the contents of pyforward.tar.gz into a local folder on your machine and run the program router.py. In the GUI, select your wifi interface (typically 'wlan0') on the left drop-down and your internet/public interface (such as 'ppp0') on the right drop-down. Then click 'Start Routing' button, provide configuration details such as your virtual router's IP address and SSID and click OK. Now your virtual router is running. Just click the 'Stop Routing' button to stop it.

In case you don't have a public interface and just want a connectivity between your linux machine and your client devices (such as accessing web-server or ssh on your machine), then select the local interface ('lo') in the right drop-down.