5

I have a laptop with an Atheros card and I woud like 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.

  • 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
5

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

  • 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
1

You can use wifi-ap for that.

wifi-ap is a snap package that will help you easily create an access point via terminal. All you have to do is to install it with the command sudo snap install wifi-ap, then call it from terminal like this wifi-ap.config to configure your access point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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