View Full Version : How to get the real IP when using Akamai?
dangaul
06-25-2009, 04:11 PM
we use akamai for caching our site. When a user signs up/posts the akamai IP is logged instead of the real user IP, making it hard to ban spammers.
Akamai does pass the IP of the client in the header under the name "True-Client-IP".
Is there a way to capture this and use this for the IP for new users/posts without modifying core files?
UKBusinessLive
06-25-2009, 04:19 PM
we use akamai for caching our site. When a user signs up/posts the akamai IP is logged instead of the real user IP, making it hard to ban spammers.
Akamai does pass the IP of the client in the header under the name "True-Client-IP".
Is there a way to capture this and use this for the IP for new users/posts without modifying core files?
Not sure about this Dan, But have you tried to ask Akamai Support ?? If anyone will know it will be those guys
Support Issues
For urgent issues please call
(877) 4-AKATEC (US and Canada only) or
(617) 444-4699.
For non-urgent issues please e-mail
ccare@akamai.com
Hope that Help mate
:D
dangaul
07-17-2009, 04:47 PM
Thanks for the comment.
It's not something Akamai can help with. Akamai passes the client's IP through a different header (True-client-ip) versus the normal client IP, since akamai acts as a barrier between our site and the user.
What I'm looking for is a way in vbulletin to use the IP passed in the header "True-Client-IP".
So, normally in PHP you use:
$_SERVER['REMOTE_ADDR'];
I have to use $_SERVER['True-Client-IP']. Is there a way to do this easily in Vbulletin instead of modifying core files.
Marco van Herwaarden
07-20-2009, 01:42 PM
There should also be an option to forward the real IP in the normal environment variable.
dangaul
07-22-2009, 03:32 AM
Hi Marco,
I can't seem to find this option in the control panel. Is it in a config file instead?
Thanks!
Marco van Herwaarden
07-22-2009, 10:05 AM
I don't know, i don't have any knowledge of akamai, but that is a common setting in those devices.
abdobasha2004
02-20-2013, 11:30 AM
open /includes/class_core.php
find function fetch_ip()
{
return $_SERVER['REMOTE_ADDR'];
}
make it :
function fetch_ip()
{
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.