My forum indicate that, all my users have a ip from cloudflare


#1

Hello.
I have configured my dns of my site for cloudflare, all work fine but, my site its a forum, I can view the users ip (if I need block some user, or banned…etc…)
Since use dns’s of cloudflare I view that, all my users have a ip’s from or of cloudflare, not the real ip of the user.

How I can solved this?

Thanks in advanced.


#2

Cloudflare is proxying your visitors, so your server sees all requests as coming from Cloudflare.

See if your forum has a way to handle proxied requests. Cloudflare uses two headers that show the visitor’s actual IP address: CF-Connecting-IP and X-Forwarded-For


#3

Hello.
Thanks for your reply.
My forum (vbulletin forum) only have one point about proxy, this is the explained:

"Select the subnet mask that reflects the level of control you want to run against IP addresses when a session is recovering.

This is useful if you have a large number of users behind proxy servers such as AOL.

The more this is reduced, the greater the security risk of session theft."

I think that not, not work for this and in my case, think that, the solucion its mod_cloudflare.

I have a VPS and root access, you suggest install mod or cPanel plugin?

Thanks and regards!


#4

vBulletin docs say the very end of config.php has a line to uncomment to restore X-Forwarded-For

http://vb5support.com/reference/config_php


#5

Ouu, yes!!! I don’t view this…ups…

Ok, in the config.php appears this instructions:

“/* If the real IP is passed in a http header variable you can set the name here; */
//$config[‘Misc’][‘proxyipheader’] = ‘HTTP_X_FORWARDED_FOR’;”

What config need for Clodflare?
For example this:
//$config[‘Misc’][‘cloudflare’] = ‘HTTP_X_FORWARDED_FOR’;"

Or this question is for vbulletin developers?

Again, thank you very much!


#6

It should look just like:
$config['Misc']['proxyipheader'] = 'HTTP_X_FORWARDED_FOR';

So get rid of the // that they have at the beginning.


#7

Thanks sdayman,

Yes, uncomment the line and this is all, only the last part of the line above, confusion for me, for this reasson I was think in enter cloudflare:
/* If the real IP is passed in a http header variable you can set the name here; */
This part, was confused to me.

Again, thank you, I made the changes and reactivate the cloudflare dns, wait to 24 hours and check now if work.

Again, thank you!


#8

Hello.
The cloudlfare dns are propagated, and then, I try to create a thread in my forum, now, I view that, the user (in this case, me) posted with ip of cloudflare.
I made the change in config.php:
$config[‘Misc’][‘proxyipheader’] = ‘HTTP_X_FORWARDED_FOR’;
Upload the file.
I try with other new thread but continue with ip of cloudflare, not appears with real ip…

Thanks.


#9

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.