HA app banning my IP address

I have a recurring issue with my mobile IP addresses getting blocked by IP ban. The scenario is the following:

  • i login into the HA Mobile Companion app in my home network, and everything is working fine
  • however when i move away from my home network (either on mobile data or connecting to some other Wifi APs) my app refuses to connect and i HA shows a persistent notification on IP ban.
  • the same happens on my wife’s phone
  • the ban is never caused by an incorrect login attempt where i would be entering my password into the app. The app is just trying to communicate with HA, should have a valid auth token but for some reason the HA server decides to ban it.

Here is an exceprt from my config.yaml. Note that i have added the cors section in an attempt to solve this issue, but it did not help. The problem appeared approx. a month ago and i am not aware of any configuration changes on my side that would have caused it. It seems like something on the way the app tries to renew the auth token changed.

I am accessing HA via my own domain with nginx reverse proxy and i don’t use HA cloud.

  use_x_forwarded_for: true
    - https://homeassistant.****.***
  ip_ban_enabled: true
  login_attempts_threshold: 5