Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question related to a chain of proxies IP in X-Forwarded-For #36

Closed
ADDISON74 opened this issue Nov 29, 2015 · 2 comments
Closed

Question related to a chain of proxies IP in X-Forwarded-For #36

ADDISON74 opened this issue Nov 29, 2015 · 2 comments

Comments

@ADDISON74
Copy link

My webserver is behind 3 proxy servers. If I run phpinfo() on Apache server _SERVER["HTTP_X_FORWARDED_FOR"] header has 4 IP values. The first one is the visitor's IP, the other three are proxies IPs.

If I set up RPAF_ProxyIPs for those 3 proxies IPs will eliminate them from X-Forwarded-For header leaving only visitor's IP, or will eliminate only the last IP? I installed mod_rpaf Debian package and it is not working for multiple IPs only for two. I read articles about some modifications inside mod_rpaf.c file for dealing with a chain of IPs. Is your default file able to deal with this?

Thank you.

@robocoder
Copy link

I believe your scenario is handled in 0.7.0.

@gnif
Copy link
Owner

gnif commented Nov 29, 2016

As @robocoder stated, this is handled, the first IP on the list is used. Please note though that it is much better to set the visitors real IP in a separate header on the first reverse proxy and configure mod_rpaf to use this instead, that way the X-Forwarded-For chain can't confuse things.

@gnif gnif closed this as completed Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants