Network: External Access Disabled

I am still unable to access HA outside of my network. I did everything you guys mentioned, but it did not solve anything for me.
Running on a Pi4, with DuckDNS and NGINX.
If anyone is finding out something other than what was already mentioned, please let me know!

1 Like

Describe your setup: network environment, HA environment, versions, config, IP’s, ports, policies, services, outlining your network map, etc.
And then describe what you have seen so far, what exactly is not working, and which parts seem to work, logs, was it ever worked before, etc.
And then describe what you have tried.

Pretty much what has been said before.
External access with duckdns and nginx worked perfectly up until a while ago.
I restarted NGINX, DuckDNS, HA, checked if anything was changed in any configurations on the related add-ons, added the external/internal urls in the config file.
I use a regular router, so no pfsense, or anything like that.
I don’t have any errors in logs related to add-ons or login attempts.
If I try to login through duckdns url from the local network, it’s still not working, I get the “Initializing” text, and will time out after several minutes.

I see. It is just that people wouldn’t know how to help / what to comment, if we don’t know where you stand. So I suppose the internal url works just fine from LAN, correct?

It is possible to show us:

  • The config and the log of your duckdns add-on
  • The config and the log of your NGINX add-on
  • HAOS → Settings → System → System Health
  • HAOS → Settings → System → Network
  • Which service (or services) is using the 172.30.33.0/24 network?’
  • What does this .110 IP do, under the trusted proxies
  • What’s your port forwarding setup in your router?

This is somewhat expected, since the duckdns url is not yet working from the outside.

Next, let’s start from duckdns.

  1. If you log into your duckdns control panel https://www.duckdns.org/ is the IP fresh and matching your WAN IP you are seeing from your router?
  2. Judging from the WAN IP you see from your router, your ISP did not by any chance switch to CGNAT recently, correct?

Apparently, it all started working again after I unplugged and plugged back in my router, and the ISP ONT several times.
My ISP offers the possibility too create a DDNS on my account on their website, and I tried using that to access my NVR, but that didn’t work. I was just trying to isolate the problem to see if it is from the DuckDNS/NGINX/HA Config, or is network wide. Apparently it was network wide, but after unplugging and plugging back in the devices several times, everything started working. MAGIC
@k8gg thanks a lot for your patience and for being willing to help a noob :slight_smile:

I too had the same issue. All used to work but some upgrade occurred and it stopped. My fix ended up being quite simple. I found that settings/system/network/home assistant url had not been set. Once set everything came good again.

Thank you!

I added just this snippet to my configuration.yaml to fix the warning/notice my system did not have external access.

homeassistant:
  external_url: "https://xxxxx.duckdns.org" # note no port number
  internal_url: "http://192.168.0.2:8123" # internal ip address of my HA with port number

I already had http: and some additional code, so I am not sure if that is needed for anyone finding this topic with a similar issue.

Thanks! I was able to get external access working by editing the configuration.yaml directly as other mentioned here. Also to edit the settings through the GUI I had to enable advanced mode:

Profile > Advanced Mode > (Enable). This was causing the Settings > System > Network screen to be blank for me. It was driving me crazy.

3 Likes

Thanks for the tip about enabling Advanced Mode. I had been struggling with figuring why I couldn’t enter the Network screen. It would have been helpful for HA to put up some text indicating enabling Advanced Mode was required.

1 Like

In the network settings, I just put my external IP address and now it reads Network access enabled(or something like that). I guess this setting is to be saved to your connected phones. so when they leave the house to try to connect to the external IP witch they already got from the previous connection to HA.
Hope I helped. :slight_smile:

You have to Enable Advanced Mode for the External Access Settings to Show

8 Likes

If you are using some sort of proxy you have to ensure that websockets are forwarded correctly. If they are not the typical 60s loop occurs.

Example for Apache (ProxyPass):

        # Websockets
        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} websocket               [NC]
        RewriteRule /(.*)           ws://localhost:8123/$1  [P]

This part is only for rewriting the WebSockets. Below is the ProxyPass part:

        # Proxy Pass
        ProxyRequests On
        SSLProxyEngine On

        ProxyPass / http://localhost:8123/
        ProxyPassReverse / http://localhost:8123/
        ProxyPreserveHost On
        AllowCONNECT 8123

Im having problems just accessing the network pg

If the goal is to locally(Wifi)/remotely access the HA in your local/public network HA mobile app, I would recommend using Duck DNS as following.

  1. Check IP address from Home Assistant
    • Go to Settings(keyboard Shortcut “c”) > Devices & Services. In the bottom right corner, select the Add Integration button. From the list, select Local IP Address.
  2. From your router: Allow port forwarding to your HA local ip address + port number 8123
  3. Click your profile name on the bottom left of HomeAssistant > General tab > enable “Advanced mode”
  4. Go to https://www.duckdns.org/domains, register account > create a unique sub domain with home public ip address
  5. Home assistant Settings > System > Network > “Home Assistant URL” > add just created http duckdns url
  6. Use the duck dns http url + port number in your mobile app to sign in

To enable external access go to your profile.Then enable the advanced mode and go to Settings > System > Network.Here now you can add the external address. It should enable external access.

I put an external_url in my homeassistant: of the configuration.yaml and (I think this is what did it) In System → Network I set a static ip and set the DNS Servers to 8.8.8.8. Now it says external access enabled.

Thank you for your clear and concise procedure for adding external access to HA. I have tried to use this, but am not able to get it to work. For some context, I have a containered version of HA running on RPi-4 with external access and no issues, but I have recently tried using HA OS on RPi-4 due to the add-ons and remote access features that are built in. I am able to access my HA instance through the local address or through the external address (my DDNS URL) when I’m on my local network, but I am not able to get access when I am on any other network. So, I know my port forwarding is working and I know my DDNS/URL are working. I have enabled remote access using advanced mode in HA and followed all of your procedure, but I am still not able to get fully remote access. Any thoughts on this issue?

Sorry for the late reply. Maybe try to ping you network DDNS URL and see which IP it hits? like ping in local vs in other network? My suspicion is that your local network is hitting local IP and external URL is trying to reach local IP?

Thanks for getting back to me. I was able to get a public IP address added to my ISP account and this has helped a bit, but I am still only able to use the “public IP” to access my HA instance when I am on my local network. I tried swapping the HA-OS version that is currently not allowing for external access for the containered version I have running elsewhere that is allowing external access to see if it was an issue with my equipment or thost of the ISP. Since I continued to have the same issues with the containered version, I am guessing it is an issue with the ISP. I will continue to troubleshoot, but for now I have been able to get remote access using tailscale VPN. This is not ideal for my implementation since I will need to give access to perhaps dozens of users when the netword of sensors are all installed, but it does allow testing right now. Thanks again!

1 Like