For some reason my ISP forced my router over to IPV6 overnight and same day Home assistant stopped connecting via internet (only via LAN). At first I wanted to forward 8123 port in my router over to my Raspberry PI running hass. However, that didn’t help. After some time I figured that the issue maybe with hass listening for tcp6 port
I ran:
netstat -tln
with this response
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8123 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::445 :::* LISTEN
tcp6 0 0 :::139 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
As you can see above hass is listening only on tcp4 port 8123 and not tcp6 port 8123.
I tried running
socat TCP6-LISTEN:8080,fork TCP4:192.168.0.242:8123
and HomeAssistant was back up!
For now my workaround is to put the line above last in rc.local so that it runs whenever the RPi boot up.
This isn’t however an elegant solution and I would prefer that hass would listen on both tcp and tcp6 port 8123. How do I make Home Assistant listen to tcp6 port 8123? Does Home Assistant support ipv6?
Btw. I am running Hassbian - Home Assistant 0.51.2