Login attempt or request with invalid authentication from: my public IP address

Hi All - I’m running HA in a docker container on my unraid server along with a cloudflare tunnel, nginx proxy manager and authentik for 2FA. I have a few other apps which work just fine but I cannot for the life of me get HA working.

The error I get in the logs is as follows:

WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from MY PUBLIC IP. Requested URL: ‘/auth/token’. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.42)e[0m

I’ve followed the guide here
I am able to go to ha.mydomain.com and then authenticate via authentick but once I’m redirected to HA I get this page:

My config:

# Loads default set of integrations. Do not remove.

default_config:

# Text to speech

tts:

  - platform: google_translate

automation: !include automations.yaml

script: !include scripts.yaml

scene: !include scenes.yaml

http:

  use_x_forwarded_for: true

  trusted_proxies:

    - 172.17.0.20

    - 172.17.0.1

auth_header:

    # Optionally set this if you're not using authentik proxy or oauth2_proxy

    username_header: X-authentik-username

    # Optionally enable debug mode to see the headers Home-Assistant gets

    # debug: false

# Optionally, if something is not working right, add this block below to get more information

logger:

    default: info

    logs:

        custom_components.auth_header: debug

Any help is greatly appreciated!

If you haven’t already got this working…

Try

172.17.0.20/24

I’m having the same issue. I tried expanding out trusted proxies all the way to 0.0.0.0/0 and it still didn’t work. Anyone have any ideas?