karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 106 forks source link

IP Bans from <deny-ip> list applying to the proxy's IP, not the "X-Forwarded-For" IP if supplied #286

Closed BusterNeece closed 4 years ago

BusterNeece commented 4 years ago

Hello!

We're taking advantage of the X-Forwarded-For support in order to put a reverse proxy in front of the broadcasted station. In our logs and in the listener statistics of Icecast, it shows the correct forwarded IP, but when calculating whether an IP is banned and should be rejected, it's using the proxy's IP instead, suggesting the banned determination happens before that IP switchover happens.

karlheyes commented 4 years ago

latest commit to master should deal with this now. The XFF is now done earlier and then checked for acceptance. Usual rules for bans apply.

karl