I am running Hass.io in Virtualbox on a spare laptop, and a few times a day I receive this message as a persistent notification. I’m assuming that the request is not actually coming from 127.0.0.1, and I’d like to see the actual IP address that is logging in (i am using HA Cloud via Nabu Casa).
I was looking through this page and i think i want to set up “use_x_forwarded_for” and “trusted_proxies”, but the note in the trusted proxies section has me worried:
"This is required when using use_x_forwarded_for because all requests to Home Assistant, regardless of source, will arrive from the reverse proxy IP address. Therefore in a reverse proxy scenario, this option should be set with extreme care."
Since I migrated my setup from a Rpi3 to a PC and basically started over, my assumption is it is one of my devices trying to log in and being denied (as opposed to a bot hitting the nabu casa URL). I’d like to see the IP address (internal or external) to try to determine what device I need to fix.
I already tried to set use_x_forwarded_for to true and set my trusted_proxies to my Hass.io machine’s internal IP address. When i deliberately logged in with an incorrect password, it still shows up as 127.0.0.1
Any ideas?
EDIT: Additionally, it seems that even without “use_x_forwarded_for” if I purposely log in with an incorrect password from within my home network the correct internal IP address is displayed. It seems this 127.0.0.1 address only appears when accessing via HA cloud. I’d really like to see the real IP address so i can potentially ban if necessary.
I used the example nginx location block above and it solved my “always logging 127.0.0.1” issue with ip_ban_enabled. I am running Home Assistant on a Mac with nginx. My http block is