Cloudfare - reverseproxy - login attemp invalid from external

I cannot login into my home assistant web service , it always prompts with homeassistant.components.http.ban] Login attempt or request with invalid authentication

I have multiple containers:

  • Home-Assistant Core
  • Swag (letsencrypt) for reverse-proxy
  • others

I’ve been researching similar topic that suggest adding the reverse-proxy host or network in trusted networks sections. Since I did that, i can access my page, but no login.

The traffic goes : Cloudfare subdomain homeassistant.xxxx.com => xxxxx.duckdns.x ==>> swag(letsencrypt) => docker container

I’ve tried adding all Cloudfare ipv4s in trusted networks without success.

I also tried adding this in nginx.conf without success.

server {
location / {
#proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;

    }

}

Also tied with 0.0.0.0/0 :frowning:

http:
use_x_forwarded_for: true
trusted_proxies:
- 172.19.0.17 # Add the IP address of the proxy server
- 172.19.0.0/16
- 192.168.1.0/24
- 0.0.0.0/0
ip_ban_enabled: false

login_attempts_threshold: 10

Hi,

The same thing is happening to me too, I have an installation with duckdns and nginx and it works perfectly from inside the house but from outside it has stopped working