IPs of a failed login attempt and a successful login don't match on application logs
Prerequisites
-
[x] I have checked the Wiki and Discussions and found no answer
-
[x] I have searched other issues and found no duplicates
-
[x] I want to report a bug and not ask a question or ask for help
-
[x] I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
Linux, AMD64 (aka x86_64)
Installation
Docker
Setup
On one machine
AdGuard Home version
v0.107.71
Action
IPs of a failed login attempt and a successful login don't match. AdGuard Home is running on a Docker container behind Nginx Proxy Manager and Cloudflare proxy. The proxies don't seem to be an issue because when the login is successful, AGH prints the correct public IP.
Expected result
In both cases the IP shown should be the real public IP
2026/01/10 20:11:08.616322 [error] POST agh.domain.com /control/login: from ip 90.130.107.123: invalid username or password
2026/01/10 20:11:23.228003 [info] webapi: successful login user=admin ip=90.130.107.123
Actual result
The real public IP is only shown for successful login attempts
2026/01/10 20:11:08.616322 [error] POST agh.domain.com /control/login: from ip 127.0.0.1: invalid username or password
2026/01/10 20:11:23.228003 [info] webapi: successful login user=admin ip=90.130.107.123
Additional information and/or screenshots
No response
How are you passing the real IP to AdGuardHome for the successful login to display the correct IP?
I see the same thing. I have Caddy reverse proxying to AdGuardHome and it sends the IP using the X-Forwarded-For header. If I use the correct password it logs the correct IP, if I use the wrong password it shows the wrong IP. It looks like it's using the connecting IP of the proxy rather than the clients real IP. So I guess in the case of the wrong password it's not parsing the X-Forwarded-For header.
Yeah in my case I use Nginx Proxy Manager. What I mean is that if AGH knows the real IP for successful auths, it can also know it for failed auths.
Thanks I will raise this to the dev team to lookat.
@JGeek00, good day. Just to be clear, do you set dns.trusted_proxies in your config?
@ainar-g yeah I'm using nginx proxy manager and it's on the same machine as AdGuard Home, both set up with network_mode host on the docker compose.
trusted_proxies:
- 127.0.0.0/8
- ::1/128
Hello, @JGeek00, we assume, that this bug was fixed in out latest edge release. Could you please check if it works for you?