Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a laptop with an Atheros card and I want to use it as a wireless access point. I need an AP with WPA/WPA2 encryption for testing purposes; I don't need any routing functionality or anything else (it's fine if it has that, but it's not a requirement). A live CD would be good, I just want something that's easy to setup -- like I mentioned, it's not for real use. I tried it on Ubuntu but I guess by default Ubuntu is missing the special drivers required to act as an access point.

share|improve this question
    
I ended up using Windows 7 and virtual wifi (google that). quite easy and microsoft forces drivers to already include the necessary functions :-) –  stefan.at.wpf May 25 '11 at 14:12
    
which atheros card do you have? lspci output? 11abg or 11n? –  freethinker May 25 '11 at 14:31
    
I don't know, but the windows 7 solution works great for me, so my problem is solved ;-) –  stefan.at.wpf May 25 '11 at 18:08
add comment

1 Answer

up vote 5 down vote accepted

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).

share|improve this answer
    
that looks quite simple, though the windows version is even easier ;-) but a very good record for linux users and the archive, tahnk you! –  stefan.at.wpf May 26 '11 at 12:58
    
@stefan.at.wpf: there might be some graphical interface to hostapd, but I wouldn't know. Glad you've found a solution. –  André Paramés May 26 '11 at 15:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.