vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Prevent guests/users from using proxies at your forum (https://vborg.vbsupport.ru/showthread.php?t=235638)

ProFifaLeagues 05-21-2010 11:55 PM

thanks :) great mod

stevo_s 05-22-2010 09:15 AM

Hi - How do I install it? I've never installed a mod before. Is it easy to uninstall without damaging the forum?

ProFifaLeagues 05-22-2010 10:49 AM

very easy mate just login to admin cp and upload the xml file you download above into the add remove products area then goto main vbull options and configure it!

stevectaylor 05-25-2010 05:07 AM

Will it be detrimental to Facebook connect?

buurman 06-08-2010 07:16 PM

with a whitelist it would be very interesting....

thanks for the hard work :)

CyberSultan 06-18-2010 11:15 PM

Installing this prevented me from accessing my own site from home. Said I was behind a proxy. I use Verizon FiOS service. Had to uninstall. :(

elwachiman 06-21-2010 11:09 PM

can i use for version vb4.0.3?

ARPRDcom 06-22-2010 03:00 AM

What are those at work doing online ?? Get to work ...lol Just kidding..

For those that have cpanel and AWSTATS you can block the proxies with cpanel and you can see who is using a proxy from AWSTATS...

James

borbole 06-22-2010 01:42 PM

Quote:

Originally Posted by elwachiman (Post 2057174)
can i use for version vb4.0.3?

Yes.

DAMINK 07-10-2010 09:23 PM

This is very useful for my needs.
I simply ban new registrations with proxy and allow registered users to view under proxy.
Very nice and thanks borbole.

borbole 07-11-2010 03:19 PM

Quote:

Originally Posted by DAMINK (Post 2067387)
This is very useful for my needs.
I simply ban new registrations with proxy and allow registered users to view under proxy.
Very nice and thanks borbole.

You are welcome. And thank you as well for your feedback/comment :)

demonfatal 07-12-2010 08:53 AM

Very nice hack!
But please can you add a function for allow some usergroups to use a proxy?

elwachiman 08-04-2010 10:33 PM

Quote:

Originally Posted by DAMINK (Post 2067387)
This is very useful for my needs.
I simply ban new registrations with proxy and allow registered users to view under proxy.
Very nice and thanks borbole.

same here good mod tnks man

Blooded 09-17-2010 03:09 AM

workin perfect :)

borbole 09-17-2010 08:58 AM

Thank you for your comment guys, appreciate them :)

Delphiprogrammi 09-17-2010 10:24 AM

nice one but it won't stop proxies that don't send the 'HTTP_X_FORWARDED_FOR' header but those are hard to find well not so hard if you know where to look :D

SEW810 11-26-2010 03:17 AM

https://vborg.vbsupport.ru/external/2012/01/11.gif Installed
https://vborg.vbsupport.ru/external/2012/01/11.gif Nominated
https://vborg.vbsupport.ru/external/2012/01/11.gif Working on vb 4.0.8 PL 2

Great mod. Thnx

RichieBoy67 12-22-2010 07:14 AM

Will this work with 4.1?

Thanks

Mo HaRbI 01-11-2011 04:25 AM

Good work
Downloaded now to try,

Thank you

clauz 01-17-2011 03:57 PM

Very nice hack. But can you add a whitelist?

PreciseDemise 01-22-2011 12:05 AM

Superb, thanks =D

onehost 02-14-2011 12:30 AM

no more updates? You can not make it better if you do not update....

OldSchoolDSL 02-14-2011 12:43 AM

Installed

Not sure if its working, but I'm not getting any errors either.

4.1.1 :)

OldSchoolDSL 02-14-2011 12:58 AM

Quote:

Originally Posted by OldSchoolDSL (Post 2162375)
Installed

Not sure if its working, but I'm not getting any errors either.

4.1.1 :)

Seems to be working. Tried to visit my community using a proxy and was denied.

OldSchoolDSL 02-14-2011 05:41 AM

Quote:

Originally Posted by OldSchoolDSL (Post 2162383)
Seems to be working. Tried to visit my community using a proxy and was denied.

Un-installed :o

This did add to my load and also seemed to block a few valid users (sometimes even me).

Good idea though.

clauz 02-15-2011 03:32 AM

If a forum user is connected by a router with external management on 80 port then it is considered as proxy... so access denied.
If a user host a web page on that IP address also it is considered as proxy.

No offense, great job but I consider at least a white list as a must.

borbole 02-15-2011 02:36 PM

Quote:

Originally Posted by clauz (Post 2162681)

No offense, great job but I consider at least a white list as a must.

No offense taken. I will add shortly a white list but that would be a paid mod.

clauz 02-17-2011 07:39 AM

What about the new users (connected by a router with 80 port management) that want to register the forum?
White list can only be used with a already know IP.

borbole 02-17-2011 01:24 PM

Quote:

Originally Posted by clauz (Post 2163515)
What about the new users (connected by a router with 80 port management) that want to register the forum?
White list can only be used with a already know IP.

You can add their IP at the white list option.

clauz 02-23-2011 12:05 PM

How can I add their IP if I don't know it?
I do not know if a user with some IP, using some 80 port router would like to register on my forum.
Yes, I can add it later to the white list but how anybody (random people) can register on my forum?

ArtakEVN 08-15-2011 01:21 PM

Uninstalled. Some users without proxy can't enter the forum.

iDHKHCM 01-13-2012 11:41 PM

Quote:

Originally Posted by borbole (Post 2163579)
You can add their IP at the white list option.

where are you paid mods? i went to your site didnt see any? thanks in advance

SᴩiDᴇЯ 01-22-2012 02:14 PM

Great Mod i love that you are stopping those missarable spammers.

I have just started an awesome Gamers Community Site here: http://XGamesBB.com and spammers are hitting me hard. I don't know why? Maybe it's my awesome looking skin not sure.

If i paid you to add an Exception rule ie, Exclude user groups by their ID, would you do this for me?

Please PM me asap.

Thank you in advance.

HHelp1 01-23-2012 10:18 PM

Is it work for 4.1.8 ?

steviewonder44 01-23-2012 10:54 PM

My forum just slowed right down with this and shows half my visitors with error
message

Nirjonadda 02-24-2012 03:26 PM

Not Supported for 4.1.10

FinalFantasy 11-25-2012 09:44 AM

Here is a 100% working proxy detection script, hope you can update your mod :)

Code:

<?php
//
// Script php : Detection Proxy
// By : lemoussel - Aout 2009
//
//
//
//@error_reporting(E_ALL | E_NOTICE);
@set_time_limit(0);
@error_reporting(E_ALL ^ E_NOTICE);
 
function get_ip() {
  if($_SERVER) {
    if($_SERVER['HTTP_X_FORWARDED_FOR'])
      $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    elseif($_SERVER['HTTP_CLIENT_IP'])
      $ip = $_SERVER['HTTP_CLIENT_IP'];
    else
      $ip = $_SERVER['REMOTE_ADDR'];
  }
  else {
    if(getenv('HTTP_X_FORWARDED_FOR'))
      $ip = getenv('HTTP_X_FORWARDED_FOR');
    elseif(getenv('HTTP_CLIENT_IP'))
      $ip = getenv('HTTP_CLIENT_IP');
    else
      $ip = getenv('REMOTE_ADDR');
  }
 
  return $ip;
}
 
function detect_proxy($myIP) {
  $scan_headers = array(
            'HTTP_VIA',
            'HTTP_X_FORWARDED_FOR',
            'HTTP_FORWARDED_FOR',
            'HTTP_X_FORWARDED',
            'HTTP_FORWARDED',
            'HTTP_CLIENT_IP',
            'HTTP_FORWARDED_FOR_IP',
            'VIA',
            'X_FORWARDED_FOR',
            'FORWARDED_FOR',
            'X_FORWARDED',
            'FORWARDED',
            'CLIENT_IP',
            'FORWARDED_FOR_IP',
            'HTTP_PROXY_CONNECTION'
        );
 
  $flagProxy = false;
  $libProxy = 'No';
 
  foreach($scan_headers as $i)
            if($_SERVER[$i]) $flagProxy = true;
 
  if (    in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
        || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 1))
      $flagProxy = true;
 
  // Proxy LookUp
  if ( $flagProxy == true &&
        isset($_SERVER['REMOTE_ADDR']) &&
        !empty($_SERVER['REMOTE_ADDR']) )
        // Transparent Proxy
        // REMOTE_ADDR = proxy IP
        // HTTP_X_FORWARDED_FOR = your IP 
        if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&
              !empty($_SERVER['HTTP_X_FORWARDED_FOR']) &&
              $_SERVER['HTTP_X_FORWARDED_FOR'] == $myIP
            )
            $libProxy = 'Transparent Proxy';
              // Simple Anonymous Proxy         
              // REMOTE_ADDR = proxy IP
              // HTTP_X_FORWARDED_FOR = proxy IP
        else if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&
                  !empty($_SERVER['HTTP_X_FORWARDED_FOR']) &&
                  $_SERVER['HTTP_X_FORWARDED_FOR'] == $_SERVER['REMOTE_ADDR']
                )
                $libProxy = 'Simple Anonymous (Transparent) Proxy';
              // Distorting Anonymous Proxy         
              // REMOTE_ADDR = proxy IP
              // HTTP_X_FORWARDED_FOR = random IP address
              else if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&
                        !empty($_SERVER['HTTP_X_FORWARDED_FOR']) &&
                        $_SERVER['HTTP_X_FORWARDED_FOR'] != $_SERVER['REMOTE_ADDR']
                      )
                      $libProxy = 'Distorting Anonymous (Transparent) Proxy';
                  // Anonymous Proxy
                  // HTTP_X_FORWARDED_FOR = not determined
                  // HTTP_CLIENT_IP = not determined
                  // HTTP_VIA = determined
                  else if ( $_SERVER['HTTP_X_FORWARDED_FOR'] == '' &&
                            $_SERVER['HTTP_CLIENT_IP'] == '' &&
                            !empty($_SERVER['HTTP_VIA'])
                          )
                          $libProxy = 'Anonymous Proxy';
                        // High Anonymous Proxy         
                        // REMOTE_ADDR = proxy IP
                        // HTTP_X_FORWARDED_FOR = not determined                 
                        else
                          $libProxy = 'High Anonymous Proxy';
 
  return $libProxy;

}
 
$ip = get_ip();
 
echo 'Proxy Server Detection<br>';
echo '=================<br><br>';
$typeProxy = detect_proxy($ip);
echo 'Use Proxy Server : '.$typeProxy.'<br>';
echo '<br>';
echo 'Brief IP Information'.'<br>';
echo '--------------------'.'<br>';
echo 'Your IP : '.$ip.'<br>';
echo 'Language : '.$_SERVER['HTTP_ACCEPT_LANGUAGE'].'<br>';
echo '<br>';
echo 'Detail IP Information'.'<br>';
echo '---------------------'.'<br>';
echo 'HTTP_ACCEPT : '.$_SERVER['HTTP_ACCEPT'].'<br>';
echo 'HTTP_ACCEPT_ENCODING : '.$_SERVER['HTTP_ACCEPT_ENCODING'].'<br>';
echo 'HTTP_ACCEPT_LANGUAGE : '.$_SERVER['HTTP_ACCEPT_LANGUAGE'].'<br>';
echo 'HTTP_ACCEPT_CHARSET : '.$_SERVER['HTTP_ACCEPT_CHARSET'].'<br>';
echo 'HTTP_CONNECTION : '.$_SERVER['HTTP_CONNECTION'].'<br>';
echo 'HTTP_HOST : '.$_SERVER['HTTP_HOST'].'<br>';
echo 'HTTP_KEEP_ALIVE : '.$_SERVER['HTTP_KEEP_ALIVE'].'<br>';
echo 'HTTP_USER_AGENT : '.$_SERVER['HTTP_USER_AGENT'].'<br>';
echo 'REMOTE_HOST : '.@gethostbyaddr($_SERVER['REMOTE_ADDR']).'<br>';
echo 'REMOTE_PORT : '.$_SERVER['REMOTE_PORT'].'<br>';
echo '<br>';
echo 'REMOTE_ADDR : '.$_SERVER['REMOTE_ADDR'].'<br>';
echo 'HTTP_VIA : '.$_SERVER['HTTP_VIA'].'<br>';
echo 'HTTP_X_FORWARDED_FOR : '.$_SERVER['HTTP_X_FORWARDED_FOR'].'<br>';
echo 'HTTP_PROXY_CONNECTION : '.$_SERVER['HTTP_PROXY_CONNECTION'].'<br>';
echo 'HTTP_CLIENT_IP : '.$_SERVER['HTTP_CLIENT_IP'].'<br>';


?>

This is from your No proxy Allowed.xml
Code:

if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) || @fsockopen( $_SERVER['REMOTE_ADDR'], 443, $errstr, $errno, 1 ))
        {

What if i change it to
Code:

if (    in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
        || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 1))
{


the one 05-17-2015 05:52 AM

Final Fantasy what file do i add that proxy detection script is it my config.php or my htaccess

many thanks

Also this plugin slowed my website down as well how would i stop that from happening can i tweak my settings in WHM

kh99 05-17-2015 01:11 PM

Quote:

Originally Posted by michelle81 (Post 2545670)
Also this plugin slowed my website down as well how would i stop that from happening can i tweak my settings in WHM

I looked at the code and it's very simple, so there's no easy tweak for speeding it up. Well, maybe there's a way to have a shorter timeout for fsockopen, if anyone knows how to do that.

You could also only turn on the registration portion. The "Prevent guests visiting your forum" checks in hook global_start, so basically every request, and there doesn't appear to be any check for guests only (but maybe the description meant 'guest' as anyone using your forum, registered or not). Maybe it could be modified to only check when posting (or maybe just check for an http POST).

I don't really understand how this works in general. I think it's been said before in this thread, but it looks like it checks the user's ip for open ports 80 and 443. Maybe a lot of proxies have those ports open, but they're also the default ports used by web servers, so you'd also be blocking anyone with a web server running from their ip (which as people mentioned earlier, could be your own web site, you company's, your isp's, or could just be the admin port on a router).

the one 05-17-2015 02:19 PM

Would this code work in my htaccess file http://www.blackhatworld.com/blackha...ml#post3066559

Do i just add that to my httacces file in cpanel

I did something like that before but nothing changed.Does it take time for it to start working

Many thanks kh99

Or is there a script i can use and what file do i put it in

Thanks again


All times are GMT. The time now is 04:29 AM.

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.01288 seconds
  • Memory Usage 1,836KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete