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
91 stars 64 forks source link

ipv6 #53

Open seancmalloy opened 1 year ago

seancmalloy commented 1 year ago

how can i add the ipv6 address to the interface being used by this add-on. dnsmasq assigns ipv4 & ipv6 addesses to clients but not to interface. it looks like this is required to add matter (over thread) devices.

update - i am attempting to add this in fork

added option for v6 in config

ADDRESS6=$(jq --raw-output ".address6" $CONFIG_PATH) NETMASK6=$(jq --raw-output ".netmask6" $CONFIG_PATH)

...

logger "Add to /etc/network/interfaces: iface $INTERFACE inet6 static" 1 echo "iface $INTERFACE inet6 static"$'\n' >> /etc/network/interfaces

Setup interface

logger "# Setup interface:" 1 logger "Add to /etc/network/interfaces: iface $INTERFACE inet static" 1

Create and add our interface to interfaces file

echo "iface $INTERFACE inet static"$'\n' >> /etc/network/interfaces

logger "Run command: nmcli dev set $INTERFACE managed no" 1 nmcli dev set $INTERFACE managed no

logger "Run command: ip link set $INTERFACE down" 1 ip link set $INTERFACE down

logger "Add to /etc/network/interfaces: address $ADDRESS" 1 echo "address $ADDRESS"$'\n' >> /etc/network/interfaces logger "Add to /etc/network/interfaces: netmask $NETMASK" 1 echo "netmask $NETMASK"$'\n' >> /etc/network/interfaces logger "Add to /etc/network/interfaces: broadcast $BROADCAST" 1 echo "broadcast $BROADCAST"$'\n\n' >> /etc/network/interfaces

logger "Add to /etc/network/interfaces: iface $INTERFACE inet6 static" 1 echo "iface $INTERFACE inet6 static"$'\n' >> /etc/network/interfaces

logger "Add to /etc/network/interfaces: address $ADDRESS6" 1 echo "address $ADDRESS6"$'\n' >> /etc/network/interfaces logger "Add to /etc/network/interfaces: netmask $NETMASK6" 1 echo "netmask $NETMASK6"$'\n' >> /etc/network/interfaces

logger "Run command: ip link set $INTERFACE up" 1 ip link set $INTERFACE up

i have confirmed that the inet6 entry exits in /etc/network/interfaces, but doesnt bind to interface

update - no luck took /etc/network/interface out of equation and used ifconfig

Setup interface

logger "# Setup interface:" 1

logger "Run command: nmcli dev set $INTERFACE managed no" 1 nmcli dev set $INTERFACE managed no

logger "Run command: ip link set $INTERFACE up" 1 ip link set $INTERFACE up

ip -4 addr add $ADDRESS"/"$NETMASK dev $INTERFACE ip -4 addr add broadcast $BROADCAST dev $INTERFACE ip -6 addr add $ADDRESS6"/"$NETMASK6 dev $INTERFACE