[SOLVED] Wireless HW access from container

keeka

Renowned Member
Dec 8, 2019
235
34
68
Hi
I'd like to try to setup an Alpine based container running hostapd. I have searched the Proxmox forums and have not found any recent posts regarding accessing host's wireless hardware from within a container. I gather this may now be possible with lxc. How might I configure the container in PVE to achieve this?
Thanks.
 
Just an update. I now seem to have this working (in a privledged container) using the following lxc config. I don't know if it's possible/straightforward in an unprivledged container.

Code:
lxc.net.1.type: phys
lxc.net.1.flags: up
lxc.net.1.link: wlp4s0
lxc.net.1.name: wlp4s0
lxc.cgroup2.devices.allow: c 10:242 rwm
lxc.mount.entry: /dev/rfkill dev/rfkill none bind,optional,create=file

I didn't assign any IP in the initial CT veth config dialogue and instead added the veth to a bridge (for use by hostapd).

Code:
# alpine lxc guest /etc/network/interfaces
auto lo
iface lo inet loopback
iface lo inet6 loopback

auto br0
iface br0 inet static
        address 192.168.70.2/24
        gateway 192.168.70.1
        bridge-ports eth0