Debian / Ubuntu Linux: Setup Wireless Access Point (WAP) with Hostapd

www.lau‮t‬turi.com
Debian / Ubuntu Linux: Setup Wireless Access Point (WAP) with Hostapd

To set up a wireless access point (WAP) on a Debian-based Linux system, such as Ubuntu, you can use the hostapd daemon. hostapd is a user space daemon that allows you to create a WAP using a wireless network interface.

Here is an example of how to set up a WAP with hostapd on a Debian-based system:

  1. Install the hostapd package by running the following command:
sudo apt-get install hostapd
  1. Create a configuration file for hostapd. The configuration file specifies the details of the WAP, such as the wireless interface to use, the SSID, and the encryption method. You can create a configuration file by copying the default configuration file and modifying it to suit your needs. For example:
sudo cp /usr/share/doc/hostapd/examples/hostapd.conf.gz /etc/hostapd/
sudo gzip -d /etc/hostapd/hostapd.conf.gz
sudo nano /etc/hostapd/hostapd.conf

This will create a copy of the default configuration file at /etc/hostapd/hostapd.conf, and open it in the nano text editor for editing.

  1. Modify the configuration file as needed. You will need to at least specify the wireless interface to use and the SSID of the WAP. For example:
interface=wlan0
ssid=MyWirelessAP

You may also want to specify the encryption method and password. For example:

wpa=2
wpa_passphrase=mysecurepassword
  1. Enable hostapd in the system boot sequence. To do this, you can create a symbolic link from /etc/init.d/hostapd to /etc/rc2.d/S02hostapd. For example:
sudo ln -s /etc/init.d/hostapd /etc/rc2.d/S02hostapd

This will start hostapd when the system boots up.

  1. Start hostapd. To start hostapd, you can run the following command:
sudo /etc/init.d/hostapd start

This will start the WAP and make it available for clients to connect to.

Created Time:2017-10-28 14:02:26  Author:lautturi