-
Katal29 started following Docker (hidden?) internal routing
-
Docker (hidden?) internal routing
Hello, I was interested for fun, in the test of the Home Assistant (HA, docker IP: 172.18.0.4) docker with Unraid and the "Nginx Proxy Manager" (NPM, docker IP: 172.18.0.3) reverse proxy. After configuring NPM for communication with HA, accessing my subdomain, the subdomain gives me a "400: Bad Request" error. I started investigating with multiple online forums. HA requires to indicate the IP of the reverse proxy docker in its configuration. So I added the docker IP to the "configuration.yaml" file of HA with the following configuration: http: use_x_forwarded_for: true trusted_proxies: - 172.18.0.3 However, it turns out that the HA log returns an error when I try to access the HA subdomain, with the following error: 2022-10-02 22:43:51.298 ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 172.18.0.1 2022-10-02 22:43:51.400 ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 172.18.0.1 The error repeats itself twice. We see that the untrusted IP is 172.18.0.1, which is neither the IP of the HA docker (172.18.0.4) and NPM (172.18.0.3). IPs 172.18.0.1 and 172.18.0.3 not being the same, would this suggest there is internal docker IP address routing in Unraid? Why? I added 172.18.0.1 in the trusted_proxies, with no effect. The web browser console returns the following errors: Failed to load resource: the server responded with a status of 400 () /favicon.ico:1 Failed to load resource: the server responded with a status of 400 () <my_subdomain>:1 Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received <my_subdomain>:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received <my_subdomain>:1 The first two errors appear directly on click, and the last two appear after a while, and would suggest that the websocket is responding with a timeout and not working. The white rectangles correspond to my subdomain. NPM log gives no errors or warnings. No information is given in the network tracking on the web browser. I would like to point out that the configurations are as follows: - HA and NPM dockers are on the same custom network that I called "proxynet" ; - The subdomain is properly propagated in the DNS servers ; - Port forwarding is correctly defined (NPM works with other dockers in reverse proxy). Running Unraid OS 6.11.0, homeassistant (Ssickle's repository) v2022.9.7 and NGINX Proxy Manager (Djoss's repository) v2.9.18. Where do you think there is a problem? Thank you for your interest in this post.
Katal29
Members
-
Joined