TrustedProxy: Wrong IP detected by *status. #323

Closed
opened 2026-10-05 04:13:19 +02:00 by adam · 0 comments
Owner

I use since the new TrustedProxy option that can be setup only directly in the znc.conf.
I have found a bug when I entered the wrong password in the webadmin interface.

First I have set this in my znc.conf :

TrustedProxy=127.0.0.1

I use the TrustedProxy feature with nginx for redirect the webadmin interface to a subdomain. I have configured nginx for having in the header of the http request the Real-IP. When I'm connected to the webadmin interface the correct IP is displayed at the top. But when I entered a wrong password, I have received this by *status:

*status | A client from [127.0.0.1] attempted to login as you, but was rejected [Invalid Password].

Obviously the IP shouldn't be 127.0.0.1, it should be my Real-IP.

It is also possible (I'm not sure) that this bug causes some issues with Fail2Ban. When I entered severals time a wrong password for testing it, nginx (or webadmin?) took a long time (10 seconds) to show me this error:

ERROR :Closing link [Please try again later - reconnecting too fast]

I use since the new TrustedProxy option that can be setup only directly in the znc.conf. I have found a bug when I entered the wrong password in the webadmin interface. First I have set this in my znc.conf : TrustedProxy=127.0.0.1 I use the TrustedProxy feature with nginx for redirect the webadmin interface to a subdomain. I have configured nginx for having in the header of the http request the Real-IP. When I'm connected to the webadmin interface the correct IP is displayed at the top. But when I entered a wrong password, I have received this by *status: *status | A client from [127.0.0.1] attempted to login as you, but was rejected [Invalid Password]. Obviously the IP shouldn't be 127.0.0.1, it should be my Real-IP. It is also possible (I'm not sure) that this bug causes some issues with Fail2Ban. When I entered severals time a wrong password for testing it, nginx (or webadmin?) took a long time (10 seconds) to show me this error: ERROR :Closing link [Please try again later - reconnecting too fast] <!-- github-sync-id:32428636 -->
adam closed this issue 2026-10-05 04:13:19 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#323