Icecast behind Apache proxy setup - How to preserve the original listener IP

1.5k Views Asked by At

I have an icacast-kh server running on port 8000 behind apache proxy. On Icecast admin page in listeners stats, I can't see the original IP listener. I have followed a few tutorials on how to preserve the original IP when using Apache, but for some unknown reason, it does not work with Icecast. I need this to be working with Apache and not with nginx (I found a solution for this problem but it uses nginx).

Here are more details about my current setup:

  • icecast-2.4.0-kh15
  • ubuntu 20.04
  • Apache/2.4.41

Here is the host file:

<VirtualHost *:80>
     ServerName live.domain.com
     ServerAdmin [email protected]

     RemoteIPHeader X-Forwarded-For
     RemoteIPInternalProxy 127.0.0.0/8

     ProxyPreserveHost On

     ProxyPass / http://127.0.0.1:8000/
     ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>

and here is part of the icecast config:

<hostname>127.0.0.1</hostname>
    <listen-socket>
        <port>8000</port>
    </listen-socket>
    ...

enter image description here

Thanks in advance for the help!

1

There are 1 best solutions below

0
mr.d On BEST ANSWER

Thanks to @AlexParamonov i have manage to fix this.

In icecast XML config add to the node:

<paths>
     <x-forwarded-for>127.0.0.1</x-forwarded-for>
     ...
</paths>