4

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.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
me.at.coding
  • 3,117

2 Answers2

4

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

André Paramés
  • 802
  • 5
  • 12
  • that looks quite simple, though the windows version is even easier ;-) but a very good record for linux users and the archive, tahnk you! – me.at.coding 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.

Sidahmed
  • 1,328