For posterity sake, the best way to create an AP is using the hostapd
program, which is available here and prepackaged in many distros.
In Debian or derivatives, the packages comes with a file /usr/share/doc/hostapd/examples/hostapd.conf.gz
, which is an example configuration. You need to copy the file to a different directory (your $HOME
, for example), decompress it (gunzip hostapd.conf.gz
) and then edit the hostapd.conf
file with any text editor.
Search for the line which says WPA/IEEE 802.11i configuration
. The file is well docummented, but for a simple WPA2 AP you just need to:
- change the line
interface=wlan0
to match your card's interface
- (optional) change the line
ssid=test
to ssid=NetworkNameOfChoice
- uncomment the line
#wpa=1
to wpa=1
- uncomment the line which says
#wpa_passphrase=secret passphrase
and change the passphrase.
Save the file and then on a terminal run sudo ifconfig wlan0 192.168.3.1
(replacing wlan0
with your card's interface) and sudo hostapd hostapd.conf
. A new network should appear with the chosen name (or 'test' if you didn't change it).
(Note: the network will let anyone with the right passphrase connect, but it won't give it an IP address. If you want that you should ask how to set up a testing dhcp server).