Closed pteich closed 1 year ago
Add this XFF tag to your paths section, include the IPs of the proxy servers. It can be repeated to add additional IPs.
<paths>
<x-forwarded-for>15.177.30.51</x-forwarded-for>
</paths>
This will trust XFF headers from the specified addresses and utilizes them as the client IP.
I forgot to mention that we've already added this setting for the proxy's IP to the Icecast config.
It works in general but it seems that Icecast whenever a static URL is accessed keeps this remote IP in memory and then somehow logs this wrong IP by accident to the next request of a regular mount. After that the next mount requests are getting correct IPs in log.
We are using Icecast 2.4.0-kh15 behind a proxy that forwards every request (to mounts and static content) with a correct X-Forwarded-For http header.
We noticed that every request of a regular mount is logged with a wrong IP when it happens right after an access to a static resource. In fact, the mount request is logged with the IP (from X-Forwarded-For http header) that has accessed the static url right before the mount request.
Example:
The IP
15.177.38.51
is not the real IP that accessed/sunsl-chillout-mp3-192-3900120
(although the correct one was set in X-Forwarded-For http header). It was the IP for the previous logged call to/images/icecast.png
.The next mount requests are then logged with the right IP until the next request to a static resource happens.