Access Point - ether42/bootable-usb GitHub Wiki
Simply passthrough the wireless interface, the host requires iw.
lxc.network.3.type = phys
lxc.network.3.link = wlp2s0
lxc.network.3.name = wlp2s0
On the rootfs:
apt-get install hostapd bridge-utils
systemctl disable hostapdHostapd requires a bridge to forward the traffic, create /etc/network/interfaces.d/client:
auto client
iface client inet manual
auto bridge-client
iface bridge-client inet manual
bridge_ports client
up ip link set dev bridge-client up
down ip link set dev bridge-client down
Set DAEMON_CONF in /etc/default/hostapd to automatically start hostapd at boot:
DAEMON_CONF=/etc/hostapd/hostapd.confFinally, setup hostapd's configuration, /etc/hostapd/hostapd.conf:
interface=wlp2s0
driver=nl80211
hw_mode=g
ieee80211d=1
ieee80211h=1
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
country_code=FR
ssid=SSID
channel=1
wpa=2
wpa_passphrase=PASSWORD
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256
rsn_pairwise=CCMP
bridge=bridge-client
Change country_code, ssid and wpa_passphrase.
channel may be changed depending on neighbourhood usage or left to 0 for automatic selection.
hw_mode could be changed to a (any doesn't seem to be supported yet).
For the allowed values of wpa_key_mgmt, refer to hostapd.conf, some clients may not to be able to connect if the access point only supports more secure methods.