since transitioning to 0.101.1 from 0.100 i’ve started receiving
“Login attempt or request with invalid authentication from 192.168.1.x” from ipads i use to display HADashboards … i display a couple of camera entities on each display. the video widget display is blank now. these camera displays are working fine on an HA display web page although they appear much slower on this upgrade. it’s not clear what is wrong … my ha and hadashboards (4) are on a LAN only without SSL … to access remotely i use haproxy reverse proxy which terminates SSL on the haproxy host. all my testing is done on the LAN so the haproxy isn’t involved …
# my dashboard widget declaration
widget_type: camera
title: Front Door
entity_picture: http://192.168.1.123:8123/api/camera_proxy/camera.front_door
refresh: 5
It’s been oddly worded but it appears more a case of moved than disabled…
The support of configuring the auth providers for API Password and Trusted Networks via the HTTP configuration is also removed. It now needs to be configured in the auth provider section
Can't send file with kwargs: {'title': 'Deurbel', 'message': 'Er is aangebeld', 'url': 'http://192.168.1.131:8123/api/camera_proxy/camera.camera_buiten', 'caption': 'Er is aangebeld'}
Status code 401 (retry #5) loading http://192.168.1.131:8123/api/camera_proxy/camera.camera_buiten
The IP of HA even gets banned
Login attempt or request with invalid authentication from 192.168.1.131
Banned IP 192.168.1.131 for too many login attempts
It seems trusted_networks is not working anymore, although the release notes are not quite clear as it also states it must be configured in the auth provider section which I already had since a couple of releases back.
The other solution to use the long live access token in the camera url is not working, as also described here.
Trusted networks is only working for login since 0.101 (I still use that and have configured it as auth provider as shown in the config I posted). You can’t use it for stuff like cameras anymore. More details here.
Sorry to bring this up again but since upgrading from 0.100.x to 0.101.3 I have been getting IP address 127.0.0.1 banned, thus locking me out of HA when trying to log in via HA Cloud. It seems that using the local IP address from within my network still worked.
So I tried adding the below code for use_x_forwarded_for: true and trusted_proxies: hoping that it would prevent this ban, but then I was unable to get the HA login to load (via HA Cloud) at all, only local IP access worked.
Since I’m away at work I was luckily able to talk my girlfriend through logging in and #'ing out the use_x_forwarded_for: true and trusted_proxies: lines.
So in the past, I tried adding auth_providers but that seemed to cause HA to not load the GUI… not sure why as it is straight from the docs and passes the config check. Would this work to prevent the 127.0.0.1 from getting banned?
How do I determine a /16 vs. a /24 network? Not terminology I’m familiar with to be honest.
EDIT: I just Googled it… pretty sure /24 is correct as my subnet mask is 255.255.255.0
I just want to allow my laptop, tablet, phones etc which are all in the 192.168.0.x range. As for the 127.0.0.1, that was hoping to prevent the banning of what I assume is a Docker container or HA Cloud?
Ok from what you said, /24 is correct. Your config should work fine. 127.0.0.1 should mean it won’t require auth for anything on the HA machine itself.
x.x.x.x = 32 bits so a /16 means the x.x at the start is the ‘network’ a /24 means the x.x.x is the network and the remaining octet(s) are the ‘host’ so if all yours are on 192.168.0.x then /24 is correct. You should also see this as a subnet mask of 255.255.255.0 in the network settings for each device.
So… last night I again tried to include the code as per my post above. HA accepts the code, restarts fine and local access (within my home network using the HA server IP address) is fine, however I can’t access HA via the HA Cloud address. Take out the above code, restart = Cloud access restored. Any ideas? It’s really annoying me because I see that code as being the only way to get HA to stop banning 127.0.0.1 which subsequently blocks HA Cloud access
I don’t pretend to know much about any of this, but I did remember reading something on the Nabu Casa website here:
Caveats
We are currently not forwarding the IP address of the incoming request. Because of this, we are unable to support Home Assistant instances that have configured 127.0.0.1 or ::1 as trusted networks or proxies. It also means that if you use IP bans, the remote connection will be banned as a whole instead of just the address from which the incorrect passwords were entered. We are currently exploring a solution for this issue.
Yeah, I did read that but I guess I didn’t understand correctly that it would block my access. So basically my only option to prevent HA Cloud getting banned is to remove the IP Ban functionality completely… Surely other people would be having this issue as well? I really only started having trouble after upgrading from 0.100.3 to 0.101.3
I am also having this issue with HA version 0.102.3 and the AppDaemon HA Dashboard. I have a HA Dashboard running on a kindle fire tablet and I am constantly getting the Login attempt or request with invalid authentication error message with the fire tablets IP address. My appdaemon.yaml file configured almost exactly like the OP. The HA Dashboard is working and there are no issues with access, but it would be nice if my log was not getting filled up with these error message. I have tried using the Auth trusted networks and trusted users, but neither of those config setting appear to be work anymore. I would like to hear if anyone has found a work-around for this issue or if the issues is being worked on by the development team.
I could never figure this issue out with HAdashboard and appdaemon … I’ve since then switched to tileboard and wow what a major major upgrade for wall mounted tablets !!! Make the switch … I can send out my config.js file if that helps