[Deluge] #3363: web-ui logs do not show real ip when proxied

2 views
Skip to first unread message

Deluge

unread,
Mar 22, 2020, 8:29:05 AM3/22/20
to delug...@googlegroups.com
#3363: web-ui logs do not show real ip when proxied
-----------------------+--------------------------
Reporter: armagedon | Type: bug
Status: new | Priority: minor
Milestone: 2.x | Component: Unknown
Version: 2.0.3 | Keywords: web-ui nginx
-----------------------+--------------------------
Hello,

I'm using nginx to proxify the web-ui.
I want to use fail2ban to secure my installation.
but the web-ui logs only contains local ip :


{{{
13:08:35 [ERROR ][deluge.ui.web.auth :256 ] Login failed
(ClientIP 127.0.0.1)

}}}

I've make many test in nginx config file, bot can't make it work.
here the part that supposed to send the original IP :
{{{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Proto $scheme;

}}}

the part of the deluge code making the log (auth.py):


{{{
log.error('Login failed from %s', __request__.getClientIP())
}}}

do you think, it should call something else than getClientIP ?

thank you.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3363>
Deluge <https://deluge-torrent.org/>
Deluge Project

Reply all
Reply to author
Forward
0 new messages