[2.0.18] Block Open Proxy Registrants

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
50
63%
Very Good
11
14%
Good
8
10%
Fair
1
1%
Poor
9
11%
 
Total votes: 79

phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA
Contact:

Re: [2.0.18] Block Open Proxy Registrants

Post by phpDummie »

Jeen wrote:... I attempt to register underneath the proxy and I can still register, no problems what-so-ever. Nothing blocking me at all.

I figure the objective of this mod is to block registrations made under a proxy.
...
There are proxies and there are open proxies.
As far as I understand, and I have been using the MOD for over a year now, when the MOD checks a server for being a proxy server, that server has to respond explicitly as 'open proxy'. Registrations will be blocked from these kind of proxy servers only.
Jeen
Registered User
Posts: 15
Joined: Sat Dec 08, 2007 12:32 pm

Re: [2.0.18] Block Open Proxy Registrants

Post by Jeen »

phpDummie wrote:
Jeen wrote:... I attempt to register underneath the proxy and I can still register, no problems what-so-ever. Nothing blocking me at all.

I figure the objective of this mod is to block registrations made under a proxy.
...
There are proxies and there are open proxies.
As far as I understand, and I have been using the MOD for over a year now, when the MOD checks a server for being a proxy server, that server has to respond explicitly as 'open proxy'. Registrations will be blocked from these kind of proxy servers only.
Open proxies. Yeah, I saw that at the beginning. Hrm. Okay, how can I tell the difference? I've got people that were coming in using avoidr.com but since I banned the IP's under what avoidr uses, they could easily go find another one. I don't know the likelihood of them googling a proxy server and it being either just a proxy or an open proxy.

I need to know an open proxy that I can test to see if I even have everything in this MOD working correctly. Do you have a suggestion? Or maybe a tip to how I can tell the difference and find one? lmao

Annnd, I guess it would be in my best interest to somehow block ALL types of proxies. I don't know if this is possible, but maybe there's a MOD that can help as a band-aid that I don't know about? Or at least another MOD I can install with this one that'll block some other types of proxies while this one blocks open ones.

Thank you for your help.
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: [2.0.18] Block Open Proxy Registrants

Post by TerraFrost »

Jeen wrote:
phpDummie wrote:
Jeen wrote:... I attempt to register underneath the proxy and I can still register, no problems what-so-ever. Nothing blocking me at all.

I figure the objective of this mod is to block registrations made under a proxy.
...
There are proxies and there are open proxies.
As far as I understand, and I have been using the MOD for over a year now, when the MOD checks a server for being a proxy server, that server has to respond explicitly as 'open proxy'. Registrations will be blocked from these kind of proxy servers only.
Open proxies. Yeah, I saw that at the beginning. Hrm. Okay, how can I tell the difference? I've got people that were coming in using avoidr.com but since I banned the IP's under what avoidr uses, they could easily go find another one. I don't know the likelihood of them googling a proxy server and it being either just a proxy or an open proxy.
avoidr isn't a proxy in the sense that this MOD uses the term. The MOD Author notes elaborate:

Code: Select all

##   Q: tomcavboy3 asks "This mod will not work if you use them free proxy surf websites,
##      such as http://proxy.guardster.com/ ?"
##
##   A: No - this MOD can only detect open HTTP proxies.  In fact, whether or not these
##      "proxy surf" websites even qualify as proxies is up for debate.  Do a Google search
##      for "proxy list".  The hits that Google returns aren't "proxy surf" websites - they're
##      lists of open HTTP proxies.  Do a Google search for "proxy".  The hits that are returned
##      are again for HTTP proxies - be they for the software used to operate one or lists of
##      them.  Basically, when most people refer to a proxy, they aren't refering to a "proxy
##      surf" website - they're refering to HTTP proxies.  So no - this MOD won't detect "open
##      proxy" websites.
##
##      Besides, just because someone labels something as an open proxy doesn't mean it actually
##      is.
If you want to be able to detect "proxy surf websites", you'll have to use something like IP Unmasker / Proxy Revealer.
I need to know an open proxy that I can test to see if I even have everything in this MOD working correctly. Do you have a suggestion? Or maybe a tip to how I can tell the difference and find one? lmao
To be honest, I think finding open proxies of the kind this MOD detects is rather difficult. At least if you're not willing to pay money...
Annnd, I guess it would be in my best interest to somehow block ALL types of proxies. I don't know if this is possible, but maybe there's a MOD that can help as a band-aid that I don't know about? Or at least another MOD I can install with this one that'll block some other types of proxies while this one blocks open ones.
IP Unmasker / Proxy Revealer :)
Jeen
Registered User
Posts: 15
Joined: Sat Dec 08, 2007 12:32 pm

Re: [2.0.18] Block Open Proxy Registrants

Post by Jeen »

*squeal* Thank you! This will definitely come in handy. Your advice is a godsend. Thank you muchly. :D
Iridium2
Registered User
Posts: 2
Joined: Sun May 11, 2008 6:15 pm

Re: [2.0.18] Block Open Proxy Registrants

Post by Iridium2 »

Hi,

I have successfully installed this mod. But I am confused about three things.

1) it says:
Block Open Proxy Registrants
This MOD can only be enabled once a proxy has been successfully tested via the ACP.


Does that mean I can only 'activate' this mod once I have manually found an 'open proxy'?
Or does it mean I have to at least use the CHECK IP option once before activating it?

2)
User Agent String
Determines how HTTP requests ought to identify themselves when attempting to connect to a proxy.


What does this do? Is the entered information 'phpBB Open Proxy Detector' relevant?
I do not see the meaning let alone the use for this input section.

3)
When pressing the debug option is says in the second section:
Sample HTTP Request 2

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mounted-storage/home30c/sub002/sc28943-KTRK/www/proxy/connect.php on line 37
GET http://www.mysite.com/proxy/serve.php HTTP/1.0
Host: http://www.mysite.com
User-Agent: phpBB Open Proxy Detector
Connection: close


Clearly an error of some sort, but is this needed?

Any help and information is greatly appreciated.

Thanks.
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: [2.0.18] Block Open Proxy Registrants

Post by TerraFrost »

Iridium2 wrote:Hi,

I have successfully installed this mod. But I am confused about three things.

1) it says:
Block Open Proxy Registrants
This MOD can only be enabled once a proxy has been successfully tested via the ACP.


Does that mean I can only 'activate' this mod once I have manually found an 'open proxy'?
Or does it mean I have to at least use the CHECK IP option once before activating it?
The latter. The IP address you test this MOD on can be an open proxy but it doesn't have to be. The reason we conduct the test is just to see that the test actually finishes, without regard for the result. The reason being that the gimmicks this MOD uses to quickly scan for proxies don't work on all servers.
2)
User Agent String
Determines how HTTP requests ought to identify themselves when attempting to connect to a proxy.


What does this do? Is the entered information 'phpBB Open Proxy Detector' relevant?
I do not see the meaning let alone the use for this input section.
Some servers ignore HTTP requests with blank User-Agent strings, so we have to fill it with something. I could hard-code "phpBB Open Proxy Detector", but what happened if that, as a User-Agent string, got added to a blacklist, or something? Letting someone change it bypasses this problem.
3)
When pressing the debug option is says in the second section:
Sample HTTP Request 2

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mounted-storage/home30c/sub002/sc28943-KTRK/www/proxy/connect.php on line 37
GET http://www.mysite.com/proxy/serve.php HTTP/1.0
Host: http://www.mysite.com
User-Agent: phpBB Open Proxy Detector
Connection: close


Clearly an error of some sort, but is this needed?
I haven't a clue as to why you're getting that.

From connect.php:

Code: Select all

$valid_ips = gethostbynamel($server_name);
if ( !in_array($HTTP_SERVER_VARS['REMOTE_ADDR'],$valid_ips) && $HTTP_SERVER_VARS['REMOTE_ADDR'] != '127.0.0.1' )
{
	$valid_ips = implode(', ',$valid_ips).' and 127.0.0.1';
	// the following isn't translateable due to the fact that it shouldn't ever actually be called.  if it is, it's chief purpose is to help me debug.
	die('IP mismatch (requesting IP is '.$HTTP_SERVER_VARS['REMOTE_ADDR'].", valid server IPs are $valid_ips)");
}

$type = 0;
if ( $HTTP_GET_VARS['address'] != '127.0.0.1' && !in_array($HTTP_GET_VARS['address'],$valid_ips) && ($fsock = @fsockopen('tcp://'.$HTTP_GET_VARS['address'],$HTTP_GET_VARS['port'],$errno,$errstr,$board_config['proxy_delay'])) )
If in_array's second parameter wasn't an array, then you should either be getting that error twice or you should be getting that error once and then an "IP mismatch" error. But you're not getting either.

So the way I see it, you have two options. Give me FTP access so I can diagnose / debug the problem, or install the MOD that I consider to the be the successor to this MOD - Proxy Revealer.
Iridium2
Registered User
Posts: 2
Joined: Sun May 11, 2008 6:15 pm

Re: [2.0.18] Block Open Proxy Registrants

Post by Iridium2 »

Thanks TerraFrost,

I now understand the first two parts.

For the third, I will try to use that IP-Unmask script.
Your mod, even though the error, did capture two open proxies at this time.

I will get back to you when I have installed the mod.

Again, thanks for the quick reply, great mod!
User avatar
tormentor
Registered User
Posts: 94
Joined: Wed Dec 17, 2003 9:20 pm
Contact:

Re: [2.0.18] Block Open Proxy Registrants

Post by tormentor »

I removed lines 26-32 of connect.php

I've a dedicated ip on my hosting provider but the request come from the range of the servers ( 64.202.160.0/19 )

However, whatever Ip I write in the box (even fake) is detected like an open transparent proxy...

I couldn't figure out a solution, I've to keep it disabled...

P.S.

I tried to pass the string directly on connect.php with this result after deleting lines 26-32 (without deleting them the response is coherent but with an error):


Warning: in_array(): Wrong datatype for second argument in /home/tormentor/html/proxy/connect.php on line 28
UPDATE phpbb_proxies SET behavior = behavior + 1 WHERE ip_address = 'ca6a8b58' AND behavior < 65

I don't understand: if I delete lines 26-32 the var $valid_ips is no more defined but still is in the code... (I'm a noob in coding but still...)

Deleting lines 27-32 gives back a coherent response but still everything is an open proxie
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: [2.0.18] Block Open Proxy Registrants

Post by TerraFrost »

It could be that the server is using network address translation. eg. you, on a particular server, try to open up a TCP connection to 77.77.77.77. The servers gateway sees that you're trying to open up an IP address outside it's "range of control" and opens it for you. ie. the gateway is acting as a proxy. Since it'd do this for every IP address, every IP address is going to appear as a proxy.

Unfortunately, neither the server nor this script have no way of knowing that this is being done.

As for the error...

Code: Select all

$valid_ips = gethostbynamel($server_name);
if ( !in_array($HTTP_SERVER_VARS['REMOTE_ADDR'],$valid_ips) && $HTTP_SERVER_VARS['REMOTE_ADDR'] != '127.0.0.1' )
{
	$valid_ips = implode(', ',$valid_ips).' and 127.0.0.1';
	// the following isn't translateable due to the fact that it shouldn't ever actually be called.  if it is, it's chief purpose is to help me debug.
	die('IP mismatch (requesting IP is '.$HTTP_SERVER_VARS['REMOTE_ADDR'].", valid server IPs are $valid_ips)");
}

$type = 0;
if ( $HTTP_GET_VARS['address'] != '127.0.0.1' && !in_array($HTTP_GET_VARS['address'],$valid_ips)
If $valid_ips is no longer being defined...

Or if it is, with gethostbynamel... maybe gethostbynamel is returning false for you? Not sure.

That said, I don't think the MODs going to work for you, anyway, per the above...
User avatar
tormentor
Registered User
Posts: 94
Joined: Wed Dec 17, 2003 9:20 pm
Contact:

Re: [2.0.18] Block Open Proxy Registrants

Post by tormentor »

Thank you for the reply ;)
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: [2.0.18] Block Open Proxy Registrants

Post by PaulusB »

Al my members that would like to join my forum keep getting error scanning for proxies @ http://www.vr6clubholland.nl i have turned the mod off. But in the past there where none problemens. What could be the problemen. The mod is modded right in my files.

Also when i test a ip i get this message

Code: Select all

Checking 62.149.67.49...
Hostname: 62.149.67.49

Connection Timeout (0)

DNSBL Entries: [0] [1] [2] 
  

Debug Information 
Sample HTTP Request 1

GET /board/proxy/connect.php?address=62.149.67.49&port=6588 HTTP/1.0
Host: www.vr6clubholland.nl
User-Agent: phpBB Open Proxy Detector
Connection: close
Sample HTTP Request 2

IP mismatch (requesting IP is 85.17.199.95, valid server IPs are 85.17.199.38 and 127.0.0.1)

Suggestions: Just remove lines 26-32 in connect.php to bypass this problem. The reason they're not removed by default is because they work on most servers and because without them, people could, in theory, use your servers resources to build their own proxy lists
Sample SQL Query

Execution Time: 21.10ms  
Here is a screenshot whit the config
Attachments
screenshot.JPG
screenshot.JPG (128.16 KiB) Viewed 5778 times
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: [2.0.18] Block Open Proxy Registrants

Post by TerraFrost »

PaulusB wrote:Al my members that would like to join my forum keep getting error scanning for proxies @ http://www.vr6clubholland.nl i have turned the mod off. But in the past there where none problemens. What could be the problemen. The mod is modded right in my files.

Also when i test a ip i get this message

Code: Select all

Checking 62.149.67.49...
Hostname: 62.149.67.49

Connection Timeout (0)

DNSBL Entries: [0] [1] [2] 
  

Debug Information 
Sample HTTP Request 1

GET /board/proxy/connect.php?address=62.149.67.49&port=6588 HTTP/1.0
Host: www.vr6clubholland.nl
User-Agent: phpBB Open Proxy Detector
Connection: close
Sample HTTP Request 2

IP mismatch (requesting IP is 85.17.199.95, valid server IPs are 85.17.199.38 and 127.0.0.1)

Suggestions: Just remove lines 26-32 in connect.php to bypass this problem. The reason they're not removed by default is because they work on most servers and because without them, people could, in theory, use your servers resources to build their own proxy lists
Sample SQL Query

Execution Time: 21.10ms  
So users are not being allowed to register despite the MODs being disabled?

As for ACP error you're getting... you could try to do as the Suggestion thing recommends - "remove lines 26-32 in connect.php".
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: [2.0.18] Block Open Proxy Registrants

Post by PaulusB »

So users are not being allowed to register despite the MODs being disabled?
Thats correct.
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: [2.0.18] Block Open Proxy Registrants

Post by TerraFrost »

PaulusB wrote:Thats correct.
Well, I was able to register just fine...

Regardless, if the MOD is indeed disabled and still checking for proxies...

If memory serves me correctly (and it may not - do remember that this MOD is a few months shy of the four-year mark and I, probably a few years ago, all but abandoned this MOD in favor of IP Unmasker) that was an issue with older versions of this MOD, however, I also believe that issue is fixed in the latest version (v2.0.2).

Maybe something else is wrong, though. Maybe it just wasn't installed correctly to begin with. The easiest way to determine that will be to just be gien FTP access.
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: [2.0.18] Block Open Proxy Registrants

Post by PaulusB »

TerraFrost wrote:
PaulusB wrote:Thats correct.
Well, I was able to register just fine...
I have turned the mod off this morning i shall check the version.
Post Reply

Return to “[2.0.x] MOD Database Releases”