Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: r00tbear on January 15, 2015, 04:45:56 AM

Title: X-Forward-for
Post by: r00tbear on January 15, 2015, 04:45:56 AM
Hello,
I really need to get information about IP addresses of users using X-Forward-for, because I use cloudflare CND and now I see just cloudflare IPs in logs... I tried to use Bad Behavior mod, but it doesn't work or I didn't configure it right...
Title: Re: X-Forward-for
Post by: Kindred on January 15, 2015, 08:01:07 AM
well, the first question is: why are you using cloudflare?

1- it does not actually speed up a forum site
2- if you think that it obfuscates your server IP, then be aware that it does -- but only for people who don't know where to look
Title: Re: X-Forward-for
Post by: r00tbear on January 15, 2015, 09:31:52 AM
It helps to protect my server from script-kiddies, which can make me headache by using LOIC and other tools for "hacking by using just one big red button".
Title: Re: X-Forward-for
Post by: Arantor on January 15, 2015, 10:34:29 AM
Well, Cloudflare doesn't use X-Forward-For unless they've changed, they use a different header. I forget offhand which it is.

As for protecting from script kiddies, be aware that it is absolutely trivial to obtain your real IP address if your server sends email to them (like, say, the registration email).
Title: Re: X-Forward-for
Post by: r00tbear on January 15, 2015, 10:44:22 AM
"CloudFlare does append both X-Forwarded-For and X-Forwarded-Proto headers" from here https://support.cloudflare.com/hc/en-us/articles/200170946-Does-CloudFlare-include-an-X-Forwarded-For-header-
And about emails - I don't use internal email system to send emails to users, just external, like gmail (external smtp servers). Yes, I'm paranoid :)
Title: Re: X-Forward-for
Post by: Arantor on January 15, 2015, 10:46:33 AM
See http://www.simplemachines.org/community/index.php?topic=532453.0
Title: Re: X-Forward-for
Post by: r00tbear on January 15, 2015, 11:38:46 AM
Thanks! It works!