Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 06-25-2009, 04:11 PM
dangaul dangaul is offline
 
Join Date: Apr 2008
Location: Portland, OR
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to get the real IP when using Akamai?

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?
Reply With Quote
  #2  
Old 06-25-2009, 04:19 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dangaul View Post
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

HTML Code:
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

Reply With Quote
  #3  
Old 07-17-2009, 04:47 PM
dangaul dangaul is offline
 
Join Date: Apr 2008
Location: Portland, OR
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 07-20-2009, 01:42 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There should also be an option to forward the real IP in the normal environment variable.
Reply With Quote
  #5  
Old 07-22-2009, 03:32 AM
dangaul dangaul is offline
 
Join Date: Apr 2008
Location: Portland, OR
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Marco,

I can't seem to find this option in the control panel. Is it in a config file instead?

Thanks!
Reply With Quote
  #6  
Old 07-22-2009, 10:05 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know, i don't have any knowledge of akamai, but that is a common setting in those devices.
Reply With Quote
  #7  
Old 02-20-2013, 11:30 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

open /includes/class_core.php
find
PHP Code:
function fetch_ip() 
    { 
        return 
$_SERVER['REMOTE_ADDR']; 
    } 
make it :
PHP Code:
function fetch_ip()
    {
          return 
$_SERVER['HTTP_X_FORWARDED_FOR'];  
    } 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06786 seconds
  • Memory Usage 2,217KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete