2

I've configured remoteip and checked that it's actually loaded. The remoteip.conf is loaded as well. I checked the latter by introducing a wrongly formatted IP in the following (correct) config:

RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 127.0.0.1 10.10.0.1 10.10.0.2

Now when a end user loads, I can verify I see the X-Forwarded-For header with value 10.10.255.100 which is correct. However the REMOTE_ADDR variable in PHP is still the loadbalancers' IPs.

According to every tutorial there is on this subject things should simply work at this point.

hbogert
  • 411
  • 1
  • 4
  • 18

1 Answers1

5

It seem that RemoteIPTrustedProxy does not work when the end-user has an IP in an "internal" network (in this case 10.20.255.100). I'm not sure why the apache devs chose this intertwining of mechanism and policy (which imo this certainly is). To accept internal network IPs use:

RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1 10.10.0.1 10.10.0.2
hbogert
  • 411
  • 1
  • 4
  • 18