External access stopped working since upgrade

Hey all,

I’ve been unable to access my HA externally since the upgrade to supervisor-2021.06.8.

I’ve been using duckDNS & NGINX to access my system from outside my local network. I’ve restart both and check the logs, can’t see anything obvious that prevents me from accessing it via my duckDNS address.

Anyone else have this problem or can give me a pointer as to what to check to resolve this issue?

TIA.

I’ve just upgraded to 2021.7.0 and I can still access from outside my network.

1 Like

Thanks, I wonder what has gone wrong. Was working fine before the update, Indeed I updated via that configuration, but I couldn’t reconnect until I changed my address to local in Ios / macOs (http://homeassistant.local:8123).

Did you read the breaking changes ? I had to add this user the http: section in configuration.yaml

http:
  use_x_forwarded_for: true    
  trusted_proxies:
    - 10.0.0.63
    - 10.0.0.67

image

You have/use 2 proxies?

Thanks, I think this is the information I am looking for. I did not realise my reverse proxy was misconfigured… until now. Thanks for the pointer.

The proxy is on a separate pc, with ethernet and wifi interface :slight_smile:

1 Like

I gather that the trusted proxy ip address for the ‘official’ ngnix proxy Manager add-on will be the same as the ip address the home assistant server is running on. So that will be:

http:
  use_x_forwarded_for: true    
  trusted_proxies:
    - 192.168.1.99 <= homeassistant.server.ip.address

Does that sound right?

No, does not work.

See this topic :

In my case it was. Is your proxy on the HA machine? Did you also configure the proxy to pass through the real IP address?

Thanks for your feedback.

I’ve set up the Nginx Proxy Manager from the home assistant add on store.

Is your proxy on the HA machine?

Yes, installed via the add on store.

Did you also configure the proxy to pass through the real IP address?

Yes, was working prior to the update. Setup via the add-on GUI

Here is my configuration.yaml entry (referencing this thread).

http:
  server_host: 0.0.0.0
  use_x_forwarded_for: true    
  trusted_proxies:
    - 127.0.0.1

Tried with and without the server_host entry. Doesn’t work.

Hi, check the log for the right proxy ip!

You mean the ngnix log? What am I looking for exactly?

OK, I was looking in the Ngnix Log, but I think I’ve found it in the Home Assistant log.

Thought I’d found it, but I am still unable to connect. Now I can’t find it in the log.

Yes, in the HA log.

Thanks, yes I used that address. It is now working. Thanks for that.

That’s great. :slight_smile:

1 Like

For anyone else struggling with this issue:

  • Open your HA log (/config/home-assistant.log)
  • Search for “untrusted proxy”
    Should be a line like this:
2021-07-10 22:26:04 ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 172.30.33.4
  • In the HTTP section of your config file, make sure you have use_x_forwarded_for:true and add the address found in the previous step (yes, it may be some strange IP you’ve never seen before) to trusted_proxies entry like so:
http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1
    - ::1
    - 172.30.33.4
  • Reboot / restart HA
  • Start NGinx Proxy Manager add-on if it didn’t automatically start
  • It should be working now
3 Likes

Great tip. For me, finding the right IP too use was the most difficult part. Would be handy if the Nginx proxy manager add-on displayed its IP address, that would have made it easier.

BTW, what is the ::1 for? My configuration worked without it.

the IPv6 equivalent of 127.0.0.1
Portainer will show the docker container IP address and there are bound to be multiple other ways as well.

1 Like

Hello everyone, I am using the NGINX Home Assistant SSL proxy add-on and I am still having this issue.

I added the http settings to the configuration file.

Do I still need to do port forwarding to my pi? if so what would be the ports?

I have been trying a lot of combinations and nothing seems to work :confused: