mattlongman / Hassio-Access-Point

Hass.io addon to let you create a WiFi access point, perfect for using WiFi devices on off-grid installations.
MIT License
81 stars 63 forks source link

Feature Request & Implementation: Add AppArmor support for supervised docker installation #46

Open MariusHerget opened 1 year ago

MariusHerget commented 1 year ago

Hey,

I tried to install your add-on in a supervised docker installation, and apparmor denied me access to the dbus. I already had a similar issue with two other add-ons #1 #2 and tried to create an appropriate profile.

Please be advised that I am still determining whether I gave too much access.

Steps:

  1. Add apparmor: true to config.yaml
  2. Copy the attached file apparmor.txt next to config.yaml in the main folder.

apparmor.txt

I also recognized, that iptables-nft did not work in my docker until I modified the Dockerfile and installed iptables as well:

Dockerfile.txt

Thanks in advance! (Tested with version 4.5 on supervised Hassio install, Ubuntu 22.04, 64bit)

Tested config:

ssid: test
wpa_passphrase: test1234
channel: "6"
address: 192.168.99.1
netmask: 255.255.255.0
broadcast: 192.168.99.255
interface: wifi-ext-tp
eth_interface: wifi-int
hide_ssid: "0"
dhcp: "1"
dhcp_start_addr: 192.168.99.10
dhcp_end_addr: 192.168.99.20
allow_mac_addresses: []
deny_mac_addresses: []
debug: 1
hostapd_config_override: []
client_internet_access: "1"
client_dns_override: []
dnsmasq_config_override: []