HA behind Synology reverse Proxy - Problems

Hello,
I know this topic isn’t new but I can’t find a solution that works for me.

I have a Home assistant installed with HA OS on my Intel Nuc.
I also have a Synology NAS which functions as my Reverse Proxy in this case.

So far so good. But now the problems begin.
When I’m trying to log in with my IOS App I get the login prompt and can log in with my MFA code but after this, I get the following error:
“Failed to connect”, “Response Status code was unacceptable: 403 Error Code: Alamofire.AFError 9”.
The Internet says this often happens if the IP is banned in the IP ban list. It was banned multiple times when testing but I always cleared this list after testing and set the attempts threshold to a bigger number.
Now I don’t know what I could do additionally to fix this.

Do you guys have some ideas?
Thank you very much in Advance!
I have attached the settings below for further investigation.

Settings inside the Synology Reverse Proxy:

Settings inside the network Tab of HA:

Error Code in the IOS APP:


HTTP Setting in the “configuration.yaml”:
image

The error Log :

What is your companion app connection configuration? You did not mentioned this. To me it looks more like Synology error, resulting from attempt to connect to non existing (not configured on proxy) web page. Go ro Companion app on iPhone, then Settings, Companion App and check server settings. You should have there local IP:port for internal URL connection and FQDN configured in reverse proxy for external URL

How can I access these settings without a connection? Is there a trick?

As an additional information:
The second I turned off the wifi and connected to Cellular the connection was aborted and there was an error with"Forbidden".

If you are not connected to HA then you should see empty screen with cog icon in lower right corner. Tapping on this icon should bring you directly to HA server settings.

Unfortunately, I don’t have this option… I don’t even have the option to log into the Nabucasa account if I would like to use their Cloud…
In the Screenshots, you can see what I see if I press every option in the app:



So this is the first ever start of the app?
I’d do this being connected to local network first, so http://192.168.1.54:8123 should work and once connected should allow to compete setup. Once it works you be able to go to Settings screen and configure URL for remote access.
Alternnatively you can try to use your reverse proxy address: https://hassio.your_domain, this time without specyfing the port - default for https port 443 should be used automatically.
One more thing that comes to my mind - seems you are using MFA on your NAS… I’m not sure if this might somehow block reverse proxy access and requires some additional step - I’m not using it.

Now im confused… why are my settings like that?

EDIT: I updated the URLs and now its working as far as I can tell…

Indeed this is the Companion App config screen I was referring to. In Internal URL field you should have address that you have configured for External URL and in external URL you should have address configured in Reverse Proxy. But as I understand you already changed this and it is working for you now! :+1: