Ipv6 enigma - remote connection issue after modem drop

Last couple of months it has been impossible to access my HA instance remotely after a reboot of my modem (seems to happen every now and then).

The workaround that works is to wait until I can access HA from my home network (wifi – local access) and disable ipv6 in HA. This switch on / of and save does the trick to reestablish remote connectivity to my instance (via android app).

The very strange thing is that when I check my Nw settings in HA ipv6 is always disabled. My app (android) / and dashboard on pc show ipv6 as disabled. Nevertheless I have to switch to enabled and then back to disabled before saving to get it actually disabled.

Any ideas on this one?

I found a lot of threads online that speak about connectivity issues due to ipv6 being enabled but none speak about this strange (apparently incorrect) UI situation (appearing off but not actually off?)

Running HA (core 2024.5.4 Supervisor 2025.05.1 Operating system 14.2 frontend 20240501.1) on RPI

How are you connecting externally?

Homeassistant cloud?
private domain and reverse proxy?
duckdns?

look at this. Maybe when your router reboots the IP changes and doesnt get picked up. Turning IPV6 ON/OFF may cause HA to pick this up.

Not sure whats causing your issue but can you automate that OFF/ON?
Have you tried a reboot to fix this? You could setup a sensor that detects the issue and reboots HA or the host server.

Thanks for sharing your thoughts! Connect through nabu casa indeed.
Will see if I can explore that automation thought.

Found out that setting IP4 as static (instead of automatic) does the trick.