Subsonic + lighttpd reverse proxy + fail2ban

Need help? Post your questions here.

Moderator: moderators

Subsonic + lighttpd reverse proxy + fail2ban

Postby caic » Tue Nov 10, 2015 5:28 pm

Hello,

I have my Subsonic behind a lighttpd reverse proxy. I was trying to setup Fail2ban but I've realized Subsonic log server IP instead client IP:

Code: Select all
[2015-11-10 18:00:35,772] INFO LoginFailureLogger - Login failed for [admin] from [192.168.1.10]


I don't know how to fix this. I have Owncloud in the same server with the same lighttpd reverse proxy and fail2ban working correctly:

Code: Select all
{"reqId":"359ea75466baab17770cca113a3f8d20","remoteAddr":"212.36.66.87","app":"core","message":"Login failed: 'admin' (Remote IP: '212.36.66.87', X-Forwarded-For: '')","level":2,"time":"2015-11-10T15:38:25+00:00"}


i've tried mod_extforward:

Code: Select all
extforward.headers = ("X-Real-IP")
extforward.forwarder = ("192.168.1.10" => "trust")


But nothing changes.

Any idea?

Thank you.
caic
 
Posts: 3
Joined: Wed Oct 14, 2009 3:56 pm

Re: Subsonic + lighttpd reverse proxy + fail2ban

Postby grumpwagon » Tue Nov 10, 2015 6:59 pm

Must be something in your set up messing with the IP, because when I get failed logins logged, they have the correct source/client IP
grumpwagon
 
Posts: 74
Joined: Sun Sep 30, 2012 3:36 am

Re: Subsonic + lighttpd reverse proxy + fail2ban

Postby daneren2005 » Tue Nov 10, 2015 7:22 pm

grumpwagon wrote:Must be something in your set up messing with the IP, because when I get failed logins logged, they have the correct source/client IP

It is because he is behind a reverse proxy. There is already another thread for his somewhere here and we don't yet have a work around for it.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Subsonic + lighttpd reverse proxy + fail2ban

Postby caic » Thu Dec 10, 2015 5:37 pm

Hello,

I have now tryed Apache as reverse proxy:

Code: Select all
<Location /musica>
   ProxyPass        http://localhost:8080/musica
   ProxyHTMLURLMap  http://localhost:8080/musica /musica
   ProxyPassReverse http://localhost:8080/musica
   RequestHeader unset Accept-Encoding
</Location>


Subsonic has this args:

Code: Select all
SUBSONIC_ARGS="--port=8080 --context-path=/musica"


But same result:

Code: Select all
[2015-12-10 18:15:17,916] INFO LoginFailureLogger - Login failed for [admin] from [127.0.0.1]


Well, not exactly the same, with Lighttpt reverse proxy Subsonit loged server IP (192.168.1.10).
caic
 
Posts: 3
Joined: Wed Oct 14, 2009 3:56 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests