Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2002, 06:08 AM
BlackDeath BlackDeath is offline
 
Join Date: Dec 2002
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default ban proxy servers

i have several users who like to cause a lot of trouble. they boast that they can't be banned because they use proxy servers. well you can ban their true IP but once u do that, they use proxy's. there is a hack that will allow u to detect the proxy server and will even tell u their true IP. could someone modify this hack to make it an option in the admin cp that you can disallow anyone using a proxy? i would be most appreciative and so would several other people i know who have the same problem. thanks!
Reply With Quote
  #2  
Old 12-24-2002, 11:29 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is NOT tested:

edit functions.php, find:
PHP Code:
$ipaddress=$HTTP_SERVER_VARS['REMOTE_ADDR']; 
After that add:
PHP Code:
 if (getenv("HTTP_FORWARDED")!="") {
        
$proxyip=getenv("HTTP_FORWARDED");
      } elseif (
getenv("HTTP_X_FORWARDED_FOR")!="") {
        
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
      } elseif (
getenv("HTTP_CLIENT_IP")!="") {
        
$proxyip=getenv("HTTP_CLIENT_IP");
      } else {
        
$proxyip="";
      } 

find
PHP Code:
if (strstr(" ".$ipaddress," ".trim($val))!="") {
        eval(
"standarderror(\"".gettemplate("error_banip")."\");");
      } 
After that add:
PHP Code:
if ($proxyip AND strstr(" ".$proxyip," ".trim($val))!="") {
        eval(
"standarderror(\"".gettemplate("error_banip")."\");");
      } 
What it does is this: It checks if user has a proxy user and if yes it not only matchs his proxy IP but also real IP for banned IPs and if either one matches, he is banned.

However please notice that not every proxy server sends the real IP to your site so your users might have a point while saying you can not get their real IP anyway if they are using such a proxy server.

Again I didn't test the hack myself..
Reply With Quote
  #3  
Old 12-24-2002, 09:15 PM
BlackDeath BlackDeath is offline
 
Join Date: Dec 2002
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this will help a lot but i would prefer if i could make it that the board banned all proxys from registered users but allowed proxys by admins (i use a proxy at work). is that possible? thanks.
Reply With Quote
  #4  
Old 12-24-2002, 09:50 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edit global.php, find:

PHP Code:
checkipban(); 
Before that add:

PHP Code:
if (getenv("HTTP_FORWARDED")!="") {
        
$proxyip=getenv("HTTP_FORWARDED");
      } elseif (
getenv("HTTP_X_FORWARDED_FOR")!="") {
        
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
      } elseif (
getenv("HTTP_CLIENT_IP")!="") {
        
$proxyip=getenv("HTTP_CLIENT_IP");
      } else {
        
$proxyip="";
      }
if (
$proxyip AND $bbuserinfo[usergroupid]!=6) { eval("standarderror(\"".gettemplate("error_banip")."\");");exit;} 
Reply With Quote
  #5  
Old 12-26-2002, 04:28 AM
BlackDeath BlackDeath is offline
 
Join Date: Dec 2002
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i think it works. both codes work. i had someone w/ a proxy test it and it seems to show that the server is busy?? i'll post a SS of the error soon. if i want to allow mod level people or possibly create a user group that i allow proxys, how would that look? i think if someone could make this nice and clean to go along w/ the existing proxy hack, and make it an option in the admin cp, a lot of people who get trouble makers on their forums will be very happy!! thanks.
Reply With Quote
  #6  
Old 12-26-2002, 04:43 AM
BlackDeath BlackDeath is offline
 
Join Date: Dec 2002
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here is the error.
Reply With Quote
  #7  
Old 12-26-2002, 08:19 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope it's suppose to display "error_banip" template, this error does not seem related
Reply With Quote
  #8  
Old 12-26-2002, 11:23 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would affect alot of users including NTL and freeserve which are quite big in the UK who use transparent proxies and then add HTTP_CLIENT_IP to pass the real IP.
Reply With Quote
  #9  
Old 12-27-2002, 03:17 PM
BlackDeath BlackDeath is offline
 
Join Date: Dec 2002
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
It would affect alot of users including NTL and freeserve which are quite big in the UK who use transparent proxies and then add HTTP_CLIENT_IP to pass the real IP.
its been working for most, no one has gotten that error however there have been a few people who have been banned who say they aren't on proxys, why would that be?
Reply With Quote
  #10  
Old 12-27-2002, 07:12 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@BlackDeath - I know you may have trouble with Proxies, but people like myself, are forced to use a Proxy to access the internet...

Our home network will only issue an Internet connection if you have the Proxy settings setup...

You should consider all sides before totally banning

Satan
Reply With Quote
Reply


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 06:17 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04686 seconds
  • Memory Usage 2,271KB
  • Queries Executed 13 (?)
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
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete