@mattlongman
Dear Matt, dear all
Great add-on, thank you!
Have you got a recommendation for me to enable routing between lan and wlan without enabling client internet access?
My current configuration:
pc-alfa eth0 192.168.0.5 <---lan---> 192.168.0.10 HA with Hass.io Access Point on ...
eth0:1 192.168.99.2 ... 192.168.99.1 <==wlan==> 192.168.99.80 IoT-beta
routing on pc-alfa:
peter@alfa:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp0s25
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s25
192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s25
192.168.99.0 192.168.0.10 255.255.255.0 UG 0 0 0 enp0s25
from alfa ping the wlan interface on HA works fine:
peter@alfa:~$ ping 192.168.99.1
PING 192.168.99.1 (192.168.99.1) 56(84) bytes of data.
64 bytes from 192.168.99.1: icmp_seq=1 ttl=64 time=0.362 ms
From alfa ping the IoT-beta does not work (and this is what I want to get working):
peter@alfa:~$ ping 192.168.99.80
PING 192.168.99.80 (192.168.99.80) 56(84) bytes of data.
From 192.168.0.5 icmp_seq=1 Destination Host Unreachable
As soon as i will turn on client_internet_access=1 the routing / connection between alfa and beta works. However I do not want to expose the IoT wlan (192.168.99.0) to internet.
the routing table on the container hassio-access-point looks good:
bash-5.1# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.30.32.0 0.0.0.0 255.255.254.0 U 0 0 0 hassio
192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
192.168.99.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
and the forwarding is enabled:
bash-5.1# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
So actually the routing can work without involving iptables, or I’m wrong?
Any idea how to modify the routing table?
… any idea from your side would be very much welcome!
KR, Peter
My plugin Hass.io Access Point config:
Current version: 0.4.1
ssid: iot01
wpa_passphrase: **************
channel: '6'
address: 192.168.99.1
netmask: 255.255.255.0
broadcast: 192.168.99.255
interface: wlan0
hide_ssid: '0'
dhcp: '1'
dhcp_start_addr: 192.168.99.64
dhcp_end_addr: 192.168.99.128
allow_mac_addresses: []
deny_mac_addresses: []
debug: 0
hostapd_config_override: []
client_internet_access: 0
client_dns_override: []
Config on:
Home Assistant Core 2022.5.4
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.0
Kernel version 5.15.32-v8