Hass.io over IPv6

Hi there,

I recently moved and my new internet provider (Kabel Deutschland) uses DS-Lite. So I can’t access my hass.io instance remotely. I’ve tried to setup feste-ip.net, but I does not work since my Hassio instance running on my raspi3 is not reachable via IPv6. I’ve tried to use 6tunnel, but I still can’t reach it locally. Did anyone face the same problem and has a solution?

Best regards
Leo

I had similar issues, but finally got it working. First you need to ensure, that your devices get a ipv6 from your router. On a fritzbox go to Heimnetz --> Netwerk and click the pencil next to your hassio entry. Under IPv6-Adressen you should see some addresses. On my fritzbox every device has 2 IPv6 addresses.
One starting with fe80 (link local) and one starting with 2.... The second one is the one you need to use.

Now create a port forwarding to your raspi. It’s important, that the port forwarding interface ID is the correct IPv6 address (the one starting with 2...). If you have multiple addresses starting with 2..., just try one after another and see if it works.

BTW feste-ip.net or an 6tunnel is only needed, if you want to access your raspi with your mobile phone. And if you are a client of Telekom, you don’t even have to do that, because they support IPv6 already. So from any desktop client you should be able to connect to your raspi even without feste-ip or 6tunnel.

Now we will test the IPv6 connection. First we need to ensure that we don’t have any ssl_certificate and base_rul set in the http settings, otherwise you will not have access via the plain IPv6 (later you can create a domain with a AAAA entry pointing to your IPv6, but for testing purpose, try without). Also ensure, that you set server_host: ::0 (although hassio tells you to not use that, it works)
Don’t forget to reboot, when you change those settings.

So your http entry should look like:

http:
  server_host: ::0

First step to test the IPv6 would be, to take the IPv6 address, put it in [] and add the port, like:
[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:8132

Put this in your browser and see if you get a connection.

If you have access, your IPv6 is working.

Test this and let me know, if you have access to your hassio.

4 Likes

Hi. I have a simmilar issue. So I have an Hassio instance on PI. I am using Vodafone in Germany and oly have DS Lite. So only IPv6. The thing is. Locally I got it to work. I can access my instance via the local ipv4 adress. So I tried to get it with the ipv6. So the Pi (Hass .io Image) does not get an ipv6 adress. My Router just has listed it with the ipv4 and there is no option to activate it. Also when I tried to put the server_host: ::0 in there, I get a warnig in the logs and the instance does not start. No other errors. So I tried to install Hassio on an ubuntu Nodebook, which has an ipv6 adress. I also installed openhab to try to connect that. I find that overly complicated and really like Hassio, so that isn’t an option. With that I used feste-ip.net and port acces in my Router. The Openhub instance works. The Hassio does not. I think it has something to do with the docker instance, but I don’t know whats the problem.
So to recap:
Vodafone (DS-Lite) - Raspberry with Hass .io Image - no Ipv6 adress in the Router (CH7466CE) and no access from outside <> Also Hass. io on ubuntu with IPv6, and no access via ipv6
So is there any possibility to get this to work? to get an ipv6 on Hass .io Image and expose that to feste-ip net

ok I am sorry. Somehow I got it to work with just a restart after i put in server_host: ::0 and then with feste-ip.net
So what I did:
configure Hassio. After that expose the port in the router. Put in server_host: ::0 use feste-ip net to get an adress and then reboot the pi (not just restart hassio instance). It works for me

Thanks a lot! It now works! As ulfg said you actually have to reboot the pi and then it works! Now I will try to enable ssl.

Could you specify the port forwarding for a FritzBox?
According to this HowTo (https://www.juanmtech.com/hassio-duckdns-add-on-set-up) I should put the port Range to the local port 8123. But if I go try to create a IPv6 Forward in the FB, than I can only put in the local IP (“Port an Gerät”). I doubt this is correct since this implies that all external ports would be forwarded.

It actually is correct. That’s how IPv6 works. With IPv6 there’s no port forwarding like with IPv4. The IPv6 address of the machine is globally reachable, and it’s just protected by the firewall of your FritzBox. With the option in your screenshot you simple add a firewall rule to allow traffic to port X on the target machine.

You can verify this easily. With IPv4 you can only forward one port to one destination (like 8123 to the HASS machine). With IPv6 you could have 10 machines running parallel on the same port, because they all have individual public addresses.

This however has a drawback: if you use some sort of DynDNS, this has to be done by the actual machine. So if currently your FritzBox is doing that, accessing your domain with 8123 won’t get you anywhere, because the FritzBox has no service running on that port.

1 Like

Thanks for the feedback. At the moment I have DynDNS on my Fritz active, but this was only due to tinkering around trying to get hass.io accessible. So if I deactivate DynDNS on my Fritz, I should not have the problem you stated in your last paragraph?

Your DynDNS should not point to your fritzbox, but rather to your PI.
So disable the DynDNS in your fritzbox and use the DuckDNS Addon for Hassio. Now the PI will tell DuckDNS his own IPv6.

For testing purpose you can still try to access your HA without a DynDNS by using the IPv6 of your PI:
[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:8132

1 Like

Thanks, I tried it and chrome said for one of the Pi IPs shown in the Fritz “ERR_CONNECTION_REFUSED” and the other one “ERR_CONNECTION_TIMED_OUT”. For the DuckDNS IP chrome also sais “ERR_CONNECTION_REFUSED”

Then I reread your first post:

If I insert the http block as you wrote, I can not access my hass.io at all (neither via http://192.168.178.41:8123 nor via http://hassio.local:8123.

Ok so the ERR_CONNECTION_REFUSED is the right IP, but the PI does not allow the connection.

The server_host: ::0 sets support for IPv6 and disables IPv4 at the same time, so no access via your IPv4 anymore (hassio.local also points to your local IPv4).

So you have to decide if you want to access the PI via IPv4 or IPv6, both is not possible.

When you activate the server_host: ::0, can you access your PI via the IPv6 address or do you still get the ERR_CONNECTION_REFUSED error?

If you still get the error: Do you have set an base_url within the http entity?

Both is possible, IPv6 and IPv4 with the FritzBox.

On the FB you need to open port 443 say for the FB (or any port you like) then via IPv6 you can connect to the HA. With the IPv4 side you can also have 443 forwarded to the Pi and can access it like that as well. Not sure why you see a problem. I have a script to update the IPv6 address at duckdns…

If I set server_host: ::0 Hassio is accessible via IPv6, but not via IPv4. If I remove this line Hassio is accessible via IPv4, but not IPv6. So at least for me there is no way to get both of them working at the same time.

The issue here is not the FB, but rather HA only working with IPv6 or IPv4.

Sorry for the delay.
I still get the ERR_CONNECTION_REFUSED for the IPv6 adress. BTW, when I just tried it, the IPv6 of my Pi has changed compared to the last one… I did not expect that.

no, I don’t have a base_url, I only have:

http:
  server_host: ::0

In the port forwarding of the Fritz the IPv6 of the other adress (giving the time out error) is entered. This was done by the FB automatically.
image
Should I change that?

Hello,
I have pretty much the same problems as Hackmett. I installed hassio on a raspi and now I’m trying to set up remote access. The aim is to integrate the Google Assistant and IFTTT. However, I only have a DSL-lite (german ISP 1&1) connection and fail to set it up properly. I followed Zoker’s instructions and could not access the raspi either. I tried again the next day and was able to solve the problem. I don’t know if it was just a happy coincidence but it helped me to adjust the settings in the raspi first:

In the configuration.yaml I set the http settings to server_host: ::0 and then restarted the raspi. It didn’t work for me until I restarted the whole Raspi. Restarting Home Assistant alone was not enough.

Afterwards I set up port forwarding for IPv 6 (port 8123) on my Fritzbox (version 7490).

Now I can access the raspi with my laptop (connected to the same network) using the IPv6 addresses. But only as long as I am in the same network. As soon as I want to access the raspi from outside the network I get an error message:

ERR_NETWORK_ACCESS_DENIED

Now I don’t know what to do.

I am happy about any help and thank you in advance.

Best regards,
Mark

@Mark_94 From what network are you trying to access hassio. Not all networks support IPv6. You can test it here test-ipv6.com. Also try to play around with the port access settings or send a screenshot here.

1 Like

I’ve tried my Galaxy S9’s mobile network. I am a customer of Telekom and as far as I know IPv6 connections are supported.

These are my settings in the Fritzbox. Did I do everything right?

Try to enable “Selbständinge Portfreigabe” thats the only difference to my setting

Thanks for the quick feedback!

I have enabled the “Selbständige Portfreigabe”. Unfortunately, the raspi is still not available via mobile phone. Could the error be somewhere else? I’ll try again tomorrow via the computer at work.

No that is fine but you also need this:


in order to open the port so you can connect externally

1 Like