PDA

View Full Version : Moderators Functions - IP_NoView! Blocking Guests w/ problem IP addresses from Showthread & Showpost pages!


Quarterbore
22 Sep 2006, 20:09
Background:

The idea behind this product is that we really can't ban some IP addresses without locking out guests and members that we want to be able to access the forums. To further complicate this issue, with some internet providers a member can have a dozen or more IP addresses. Blocking all of these various IPs that a bad user might have would also block dozens of members that could all share the same IP addresses resulting in good guests or members not being able to access the site.

This product was created so problem guests with identified IPs can not read the threads and posts in the forums but good members can still get in and use the site! Even guests with the same IP address, will be able to look around the site, see the forums and topics being discussed (just not read the threads or posts) and perhaps decide they wish to join. This script does not impact the registration page, login page, or anything else on the site (unless you add the pluggin code to other hooks that you wish to block ;) )

How the Product works:

This script works using hooks for the start of SHOWTHREAD and SHOWPOST and if a visitor is not logged in (ie they are a guest) their IP address is compared to an array of "NoView" IP addresses. If their IP address is in that array, the user will get an error message explaining that they can not see the thread or post because their IP address is on a list of problem IPs and they can login or register to make the problem go away (see attached for showthread and showpost).

Inside the AdminCP is an option to turn this script ON or OFF and IP addresses are listed in a text area with one IP address listed per line (see attached).

NEW FEATURE ADDED with Version 2.0.0:

With some hosting companies, like AOL, users get a new IP address each time they seem to dial into AOL. This makes blocking by a specific IP address difficult if not impossible. Php however affords us a function that allows a script to resolve the host responsible for an IP address. So, with version 2.0.0 of this script I have added the ability to block viewing of threads or posts based on the host.

When using this feature, you can use as specific or general of a host as you wish but remember that if you make it too general you will impact a lot more members then if you keep it somewhat specific. For example, the person I wanted to lock out of my website showed up on my Whos Online page as "cache-mtc-ab07.proxy.aol.com". In the list of HOST IP addresses to block I could use ay of the following for that guest to no longer be able to see threads or posts:

cache-mtc-ab07.proxy.aol.com
ab07.proxy.aol.com
proxy.aol.com
aol.com
.com

Note, the one I decided to use was the "proxy.aol.com" as everything before that seemed to change with a new call. This works like the IP list such that you can add one host per line.

NEW FEATURE ADDED with Version 2.1.0:

I have added two new pluggins that will also block problem IPs or IP Hosts from viewing forums or using the search on the site. If someone does not want these, you can go into your pluggins and turn off the these pluggins inside your pluggin manager under IP_NoView!

What Does this Add to your site?
4 Small Hooks
5 Small Phrases
3 vBsettings in the settings table

Version Information:
Version 1.0.0.
- Initial Release Sept 22, 2006

Version 2.0.0
- Released Oct 2, 2006
- Added a way to block based on Resolved Host Name

Version 2.1.0
- Released Oct 5, 2006
- Fixed bug processing of BLOCKED HOSTs in array
- See: http://www.vbulletin.org/forum/showthread.php?t=128343
- HUGE thanks to nico_swd for the solution!
- Added two new plugins to block Forum viewing and Searching for problem IPs

Quarterbore
22 Sep 2006, 20:10
Reserved

I have installed this in 3.6.0 and 3.6.1 forums and I did not have any problems! I also UNINSTALLED and it did not cause any problems either but as always I suggest you do a databackup as I can't help you fix your site if this causes you problems!

Updates:

9/22/2006 17:37 EST

I just discovered a typo in the adminCP area where I had "Please note there is no trailing zero!". That should have said "Please note there is no trailing period!" Product has been fixed and a new image of the AdminCP has been uploaded.

Gizmo5h1t3
22 Sep 2006, 21:38
installed on 3.5, works no problems....

updated, that was just a phrase change wasnt it?

Quarterbore
22 Sep 2006, 21:44
installed on 3.5, works no problems....

updated, that was just a phrase change wasnt it?

Yes, just the phrase and it was not a critical fix...

Gizmo5h1t3
22 Sep 2006, 21:45
gotta admit, i was lookin for trailing zeros tho...lmao

Snake
22 Sep 2006, 22:02
Thanks man! :)

andrewrhs
22 Sep 2006, 22:11
thanks a lot, this sounds like a potentially great product.

Ajavas
23 Sep 2006, 11:17
:) Great work! Thnx and installed.

Hornstar
23 Sep 2006, 23:26
Yeah Great work, I've been looking around for something like this for quite a while.

Thanks.

bigfrank
25 Sep 2006, 05:00
Ken you are the Man, I know one place that this code will help drive out a Pest.;)

Quarterbore
02 Oct 2006, 16:52
Version 2.0.0 of this script has been created.

As indicated above, version 2.0.0 features a way to block by a partial IP Hostname to make it easier to block users of hosting companies that have extremely diverse IP addresses for their members. Now, you can require all "AOL" members as an example to be logged in to view posts or threads.

To upgrade, simply download the product and go int your vBulletin AdminCP and reupload the product. Make sure you click "Overwrite" and that is all that will be required. Your blocked IP list should not be affected!

Enjoy!

Quarterbore
05 Oct 2006, 13:43
EDIT: Product has been updated to solve a problem with the array of HOST IPs (details posted in revision history).

Gripemaster
05 Oct 2006, 15:01
*INSTALLED* and "seems" to be running fine on 3.6.2!

Does this mod have the ability to block an IP range by simply entering a partial IP? Or would that fall under blocking the host?

Thank you!

Quarterbore
05 Oct 2006, 16:12
*INSTALLED* and "seems" to be running fine on 3.6.2!

Does this mod have the ability to block an IP range by simply entering a partial IP? Or would that fall under blocking the host?

Thank you!

The IP list blocks a specific IP. The Host list will block a partial of the host(say you put in "com" it would block all hosts with com in them!).

As for the IP range, I have not worked on that yet as with host blocking I can get pretty much the same effect. For me, it is all about AOL and how they allow people to get a new IP and proxy with each new dial in!

rinkrat
06 Oct 2006, 06:19
I have been terrorized by aol'ers. I'll try it :)

Quarterbore
07 Oct 2006, 03:22
My resident troll returned and demonstrated they could still access the forum content through the archives. So, in answer to this persistent pest I have added a version of the IP_NoView! code to the archives of my site. I have uploaded a text file with directions so anybody using this can block specific IPs or hosts from viewing your archives as well!

sonsuz.glad
08 Oct 2006, 09:45
Great work! Thnx and installed.

yesfans
08 Oct 2006, 13:34
great addition! KUDOS!

jcodemasters
09 Oct 2006, 19:25
Good job.. really like it. Superb!

Wheemer
10 Oct 2006, 18:17
I installed this mod, without adding any domains or ips in the options.

Then guests were already seeing the warning and half my sites visitors couldn't view anything...

Not good at all!

Quarterbore
10 Oct 2006, 19:05
Wow, sorry! ...

To fix this, just add an IP that is impossible....

AAAAAAAAA

Next, add a HOST that is impossible

AAAAAAAAA

I will rewrite this tonight to put in a "null" check and update the product!

I thought I had verified that a null value would not do this but I need to confirm again tonight.

Wheemer
10 Oct 2006, 19:20
It's good that you are making the change... We appeciate it.

I know this mod is to stop people from getting to the posts at all, but I was wondering if it might be easy to change what is restricted. I allow guest to post in all my forums, but I don't have much control over them if they act bad.

Is it possible IP No Post might come out? :) I would like for everyone to always see the posts, but certain domains or ips could not post or reply at all...

What do you think?

Quarterbore
10 Oct 2006, 19:31
It's good that you are making the change... We appeciate it.

I know this mod is to stop people from getting to the posts at all, but I was wondering if it might be easy to change what is restricted. I allow guest to post in all my forums, but I don't have much control over them if they act bad.

Is it possible IP No Post might come out? :) I would like for everyone to always see the posts, but certain domains or ips could not post or reply at all...

What do you think?

Sure, I can do that in a couple minutes as it would be the same code just use the newpost, newreply, and newthread hooks (plus a new place for the IPs and Hosts to block from posting)... I'll do it tonight when I look at the issue with "null" values.

Quarterbore
10 Oct 2006, 23:54
I installed this mod, without adding any domains or ips in the options.

Then guests were already seeing the warning and half my sites visitors couldn't view anything...

Not good at all!

I can't reproduce this... I ran a test on my server with both text areas empty and guests had no problems. I also do not see any reason in the code that "null" would cause this problem as the IP match is a vebatum match and the Host code already eliminates "null" values.

So, my guess is your server is not able to resolve IP addresses or Hosts but I can't tell without seeing it... Perhaps you can echo your IP and HOST to see if these variables have values.

If this does not work for you, I am afraid that that the other program you asked for will not work either! Try adding your own IP address to the blocked list and log out and see if this works. Then, add your HOST to the blocked list (no IP) and then confirm if it works.

If they don't work, then this looks like a server issue on your end.

Wheemer
13 Oct 2006, 06:42
Thank you for the efforts, but I'll have to wait a while before testing this mod again. I got in a lot of trouble abou it, so I'll wait it out and try later.

I had just installed it and I hadn't even tried to enter any ips in it. So I'm not sure what the problem was, but our members started calling us forum dictators for not allowing any of them to see the sites content... :)

Karri
13 Oct 2006, 15:02
can this product be modified to prevent certain IPs from registering? (I see you are already working on a version to prevent them from posting so yay!!!)

Quarterbore
13 Oct 2006, 16:10
can this product be modified to prevent certain IPs from registering? (I see you are already working on a version to prevent them from posting so yay!!!)

Yea, the same code can also be used to stop registration by users with a specific host or IP as well...

I have the Post code done but I have not had the chance to set up my developmental board so I can test it yet. It will be done this weekend plus I can add one to block registrations. The code is bascll

Neither of these are additions are items I think I would want on my site but after my struggles with AOL trolls (Wal-Mart Connect, Netscape Connect, and AOL are all the same AOL users) I understand the need.

Netaudio
16 Nov 2006, 20:15
Good Job...

i missing a

"bad useragentliste"

"_SPIDER_BOTNAME _SPIDER_BOTINFO",
".01$",
".weblogs",
"[[:space:]]*php)",
"[A-Z]",
"[a-z0-9]",
"[G]ooglebot/2.1",
"@nonymouse.com",
"000000000;",
"8484 Boston Project",
"acc=onekill",
"aconon Index",
"Acoon Robot",
"ACR",
"ActiveAgent",
"adressendeutschland.",
"Advanced Email Extractor",
"agdm79@mail",
"Akregator",
"Alexibot",
"AlkalineBOT",
"alpha 06",
"AltaVista Intranet",
"Amiga-AWeb",
"Anarchie",

and so on....


and

"bad spywareliste"

"}|0.",
".exe|",
"123Bar",
"123Mania",
"2020Search",
"180Solutions",
"404search",
"404Search",
"7Search",
"Accelerator",
"Accessibility",
"ActivShopper",
"ActiveSearch",
"AdBar",
"AdBlaster",
"AdBox",

and so on...

and a "bad reffererliste"

"-4u.info",
"-advisor.info",
"-e-bank.info",
"-e-course.info",
"-e-shop.info",
"-esite.info",
"-site.info",
".usa.gs",
"((mature|porn|gay|nude).*(sex|teen|moms|fun))",
"(bank|business|cash|car)-loan",
"(consumer|card|debt)-credit",
"(credit-|debt-)",
"(free-|discount|deal|e-mall|loan)",
"(gangbang||pussy|porn|incest|teen)",
"(refinanc|interest|ebanking)",
".smsportali.net",
"(tgp|one).free",
"(watches|insurance)",
"=inurl:info_db.php",
"=inurl%3Ainfo_db.php",
"=inurl:links.php",

and missing "bad portliste"

"11",
"21",
"22",
"23",
"25",
"43",
"53",
"69",
"88",
"92",
"109",
"110",
"111",
"113",
"119",
"137",
"138",
"139",
"143",
"213",
"220",
"443",
"513",
"993",
"995",
"36794"

and so on...

pls
sören

jiffy
10 May 2007, 21:51
I just tried installing this in 3.6.4 and it doesn't seem to be working. Added a couple different IP's and then had a friend check and it still allowed him to raom around as a guest. Is this not compatible with 3.6.4?

Mrdby
12 May 2007, 13:54
3.6.6?

Makc666
09 Jun 2007, 05:27
3.6.6?
Work fine as I see...

As Quarterbore didn't reply for my PM but Last Online: Jun 2007 I will post a language phrase fixed version of this mod...

This is ONLY language phrase fixed version! No any function modifications!

girlspeedo
01 Sep 2007, 23:06
it worked for 3.6.4 but doesn't seem to work for 3.6.8. Same goes to NO Registeration. I had a persistent troll broke in from IP addresses previously banned. Both of these are great mods, can you make them work for the latest version of vb? Thanks!

rolloffhill
12 Sep 2007, 03:54
Yup, doesn't work for me either in 3.6.8

Quarterbore
25 Jul 2008, 16:58
Sorry, I have not been on here much since I started working on my vBClassified script. I have this running on my own 3.6.8. site and it works fine. Remember this will ONLY impact guests so add your own IP address and log out!

You will be able to use the site again by logging back in so no worry that you will get locked out! The script only impacts guests!

tinkleondabeach
27 Mar 2009, 07:41
I was wondering if there is a similar mod of this for 3.8. If there is, please do contact me!

Makc666
27 Mar 2009, 16:33
I was wondering if there is a similar mod of this for 3.8. If there is, please do contact me!
This one works with 3.8.1