Creating a wireless Access Point using a wireless card not supporting AP mode
- Details
- Category: Linux Articles
- Published on Saturday, 22 February 2014 11:28
- Written by Administrator
- Hits: 914
This article talks about how to create a wirless access point even when your wifi card does not support AP mode. The list of supported interface modes is obtained by giving the command $iw list. You would get a output as under
Supported interface modes:
* IBSS
* managed
* monitor
Incase your card supports the above three modes, this article is for you. Incase you are lucky and card supports AP mode also, then I would recommend use hostapd.
1. To start with I suggest you load install Bactrack as we would require airmon-ng software , this comes preloaded in backtrack .
2. Open a terminal and give following commands to start an AP
#Terminal1
airmon-ng start wlan0
airbase-ng -e SSID -c 10 mon0
2. Open another terminal and give following commands to configure the at0 port of AP and iptable rules required for NAT
#Terminal2
ifconfig at0 up
ifconfig at0 mtu 1400
ifconfig at0 192.168.2.1 netmask 255.255.255.0
dnsmasq -d -k -q
# iptable rules to route traffic and for NAT
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
# we are assuming a setup that wlan0 is the wireless card used to setup the AP and eth0 is the ethernet interface connected to the Internet.
# Instead of eth0 we could have ppp0 if we were using a USB 3G dongle to connect to the internet.
iptables --append FORWARD --in-interface at0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward