Topic: tech myref prev next
tech myref > hostapd
hostapd
is a simple way to start a wireless access point, using any WiFi
adapter. Install the Debian package;
sudo apt install hostapd
Enter the following into /etc/hostapd/hostapd.conf
. The ‘bridge=
’ line
bridges the wireless interface to a bridge defined in the system’s netplan
configuration;
interface=wlan0
ssid=YourChosenSSID
wpa_passphrase=YourChosenPassphrase
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
hw_mode=g
channel=11
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
rsn_pairwise=CCMP
bridge=br3
Start hostapd
in the foreground;
/usr/sbin/hostapd -P /run/hostapd.pid /etc/hostapd/hostapd.conf
Alternatively, add the -B
flag to start hostapd
in the background;
/usr/sbin/hostapd -P /run/hostapd.pid /etc/hostapd/hostapd.conf -B
Hostapd can be started on system startup with a systemd unit, such as;
[Unit]
Description=hostapd
[Service]
ExecStart=hostapd -P /run/hostapd.pid /etc/hostapd/hostapd.conf
User=root
Group=root
[Install]
WantedBy=multi-user.target