vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - Moderate New Registrations Based On IP Geographical Origin (https://vborg.vbsupport.ru/showthread.php?t=198440)

Jafo232 12-08-2008 10:00 PM

Moderate New Registrations Based On IP Geographical Origin
 
This mod will put any new registration into moderation so you can either approve or deny based on the physical location of the IP address. If the IP is located in a country that you white list, the registration will go through as normal.

This may be different for everyone else, but on my forums, I have yet to have a Russian IP sign up for anything other than posting SPAM. This plugin has moderated them all!

I hope to have time to eventually expand this to do other things. This works with 4.0.x.

You MUST download the zone files from this site:

http://www.ipdeny.com/ipblocks/

The free license does not allow me to include them with the product, plus it is better to download the latest files anyway.

No real screenshots to show here, sorry.

Changelog:

12/20/2008
  • Coded the routine in, instead of using external whois program.
  • Now compatible with Windows
  • (39 download of 1.0)
2/11/2009
  • 77 downloads at this point
  • Rewrote application to use zone files rather than relying on Arin
To upgrade, READ THE README, and re-install product (select overwrite).

Don't forget to:


Jafo232 12-09-2008 02:40 PM

Reserved...

dboogie2288 12-09-2008 02:57 PM

So uh, dumb question, I've got it installed....now what happens? Your readme, and description is a little vague.

Jafo232 12-09-2008 03:24 PM

Users who register from countries not on your white list will be moderated.. What else do you need to know?

dboogie2288 12-09-2008 03:55 PM

Ok, I dig it. I didnt know if perhaps that within the moderation panel it would show countries of origin..stuff like that. But since, I moderate everyone, this isn't really relevant...thanks for the info.

Jafo232 12-09-2008 04:11 PM

Yeah, if you moderate everyone, then this won't be useful. It is more for fine tuning your moderation criteria.

Hornstar 12-10-2008 06:23 AM

How do you know that the account signed up is going to be a spam bot or not? Because when I look at any spam bot that has spammed viagra, computer sales, TVs etc. They truly look like a legit user until they start spamming weeks later.

meissenation 12-10-2008 01:14 PM

If you analyze their IP address they will probably be from Russia or Turkey since it seems like most of the problems of the internet derives from over there. While not as effective, if you use a website like whatsmyipaddress.com and enter the IP address into the search box it will tell you an approximation of where the IP originates from.

In any case, sounds like a great idea but since I have Windows Server 2003 so it's no good for me.

Jafo232 12-10-2008 02:50 PM

Quote:

Originally Posted by hornstar1337 (Post 1682154)
How do you know that the account signed up is going to be a spam bot or not? Because when I look at any spam bot that has spammed viagra, computer sales, TVs etc. They truly look like a legit user until they start spamming weeks later.

This will not tell you 100% that someone is a spam bot, however it is no secret that vast majority of forum spammers come from places like Russia, etc.. This mod will determine the country of the IP address, and if you have not white listed that country, it will put it into moderation so you can approve it.

My motivation to write this is because of one forum I run that is a local forum for a small area in NY State. It makes no sense for people from Saudi Arabia or Russia to even want an account there. At first I was just going to outright deny registrations to these countries, but figured for prudence sake, to put them in moderation just in case there was a false positive.

meissenation 12-12-2008 08:27 PM

Still wishing you'd write this for Windows Server 2003 also.

Jafo232 12-13-2008 01:37 AM

If you can find the program called "whois" for windows, then this might work with it.

BiZiMDiYaR 12-20-2008 11:05 PM

Quote:

Originally Posted by meissenation (Post 1682363)
If you analyze their IP address they will probably be from Russia or Turkey since it seems like most of the problems of the internet derives from over there. While not as effective, if you use a website like whatsmyipaddress.com and enter the IP address into the search box it will tell you an approximation of where the IP originates from.

In any case, sounds like a great idea but since I have Windows Server 2003 so it's no good for me.

Dear Sir,

I don't expect that you read this... but I still need to tell you this... TAKE care on your comments !!! If you call my family scum, that same to you and your familiy is scum for me also, take a look there and do NEVER ever make such remark again to catogorize a whole country, due to some persons. !

MODS, how to accept such comment ?? Doesn't anybody look ??? I hope his comment will be deleted very soon and edit mine pls !

Thanks.

Jafo232 12-21-2008 12:04 AM

Quote:

Originally Posted by BiZiMDiYaR (Post 1689880)
Dear Sir,

I don't expect that you read this... but I still need to tell you this... TAKE care on your comments !!! If you call my family scum, that same to you and your familiy is scum for me also, take a look there and do NEVER ever make such remark again to catogorize a whole country, due to some persons. !

MODS, how to accept such comment ?? Doesn't anybody look ??? I hope his comment will be deleted very soon and edit mine pls !

Thanks.

No offense BiZiMDiYaR, but most of the SPAMMERS do come from those regions, and SPAMMERS are scum. If that offends you, then perhaps your country should take harsher steps against these people.

Meissenation did not say ALL people from these places are scum but:

Quote:

If you analyze their IP address they will probably be from Russia or Turkey since it seems like most of the scum of the internet derives from over there
At least when a UK or US spammer is found, their ISP shuts them off, their Governments go after them, and they are hunted like dogs. In Russia and Turkey, nothing happens to them. This is a fact.

The reason I made this mod was not to start some international incident, but to try and shut out these idiot spammers in any way I can. Is that offensive? Surely not nearly as offensive as waking up in the morning and checking your FAMILY ORIENTATED forum to find that some Russian IP posted about 30 threads all containing XXX rated pornography. If it was up to me, the Internet should be cut off from these places until their Governments can at least make an attempt at policing its use.

Jafo232 12-21-2008 02:15 AM

Ok, I broke down and made a Windows compatible version. Should work on all platforms now for that matter..

Marco van Herwaarden 12-21-2008 08:54 AM

People please cool off. Unless your family are spammers (or other unwanted internet activity), then nobody insulted your family our your fellow countrymen.

Only thing that has been posted is the observation that a lot of "scum" on the internet originates from IP addreses in those countries.

Edit: In order to avoid misinterpretations we have changed the word "scum" to "problems". This should still leave the original mesage meaning the same, but avoiding words that might be understood in the wrong way.

meissenation 12-21-2008 12:21 PM

Quote:

Originally Posted by BiZiMDiYaR (Post 1689880)
Dear Sir,

I don't expect that you read this... but I still need to tell you this... TAKE care on your comments !!! If you call my family scum, that same to you and your familiy is scum for me also, take a look there and do NEVER ever make such remark again to catogorize a whole country, due to some persons. !

MODS, how to accept such comment ?? Doesn't anybody look ??? I hope his comment will be deleted very soon and edit mine pls !

Thanks.

I apologize if you were offended by the statement as it shouldn't be offensive to anyone that isn't a spammer or hacker. My site, as well as many car-oriented websites, have been attacked a handful of times by the "Turkish Hacking Ring" and I forever will be turned off to the entire country thanks to the work of a handful of people.

Quote:

Originally Posted by Jafo232 (Post 1689918)
No offense BiZiMDiYaR, but most of the SPAMMERS do come from those regions, and SPAMMERS are scum. If that offends you, then perhaps your country should take harsher steps against these people.

Meissenation did not say ALL people from these places are scum but:



At least when a UK or US spammer is found, their ISP shuts them off, their Governments go after them, and they are hunted like dogs. In Russia and Turkey, nothing happens to them. This is a fact.

The reason I made this mod was not to start some international incident, but to try and shut out these idiot spammers in any way I can. Is that offensive? Surely not nearly as offensive as waking up in the morning and checking your FAMILY ORIENTATED forum to find that some Russian IP posted about 30 threads all containing XXX rated pornography. If it was up to me, the Internet should be cut off from these places until their Governments can at least make an attempt at policing its use.

That was the only point I was intending to make. :)

Quote:

Originally Posted by Jafo232 (Post 1689977)
Ok, I broke down and made a Windows compatible version. Should work on all platforms now for that matter..

:D:D:D:D:D:D:D:D THANK YOU SIR!!!!! :D:D:D:D:D:D:D:D

I understand Linux can be made much more secure, but it's much easier for me to fix a Windows box than a box with an OS I'm just not familiar with. :)

Jafo232 12-21-2008 04:14 PM

Quote:

Originally Posted by meissenation (Post 1690262)
:D:D:D:D:D:D:D:D THANK YOU SIR!!!!! :D:D:D:D:D:D:D:D

I understand Linux can be made much more secure, but it's much easier for me to fix a Windows box than a box with an OS I'm just not familiar with. :)

Not a problem. You know how I learned Linux? I had an old PC laying around like many of us do and I installed a flavor of Linux on it. Linux is great for older machines! I then put it on my network and just tinkered. Next thing you know, I became a Linux nut when it comes to servers. I still use XP for my desktop though.. Much easier lol..

Jim O 12-23-2008 02:13 PM

Very helpful mod. For me, however, it's more helpful to create a simple list of excluded countries as I have an international membership. Most of my spammers seem to originate in Nigeria and China, with a few from Bulgaria and Russia. It's hard to eliminate Russia as I have a number of legitimate Russian users as this is a World War II site and the Soviet Union was a major combatant. In fact a very large part of my site deals with the war on the eastern front.

I've modified the code to disallow users from specified countries. It hasn't been fully tested as I haven't had any registrations yet from those countries but the changes are fairly simple and I suspect that it will work as intended. I'd be happy to share it with the developer's permission.

Jafo232 12-23-2008 02:57 PM

Quote:

Originally Posted by Jim O (Post 1692005)
I've modified the code to disallow users from specified countries. It hasn't been fully tested as I haven't had any registrations yet from those countries but the changes are fairly simple and I suspect that it will work as intended. I'd be happy to share it with the developer's permission.

Not a bad idea, I think I will add it to the next version if I get time. To do it in the code, simply find this line in whois.php:

Code:

if (!in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }
Change to:

Code:

if (in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }
Now your include list becomes and exclude list.

Cheers.

Jim O 12-23-2008 03:14 PM

Yeah that's the basic change. I also prettied up the phrases and changed the variable "valid_countries" to "excluded_countries" just to make the code easier to understand.

Thanks again for the mod. It definitely should help.

Jafo232 12-23-2008 03:23 PM

Great, let me know how it works out for you in a while. I am considering expanding this to something more. Would be real interested in your feedback..

Jim O 12-30-2008 01:30 PM

Quote:

Originally Posted by Jafo232 (Post 1692055)
Great, let me know how it works out for you in a while. I am considering expanding this to something more. Would be real interested in your feedback..

Unfortunately it does not seem to be working. For non-ARIN related IP's it defaults to the location of the Regional Internet registry such as RIPE or APNIC. So China IP's appear to come from Australia. I had a registration from China today from IP 58.244.50.212 which localizes to Changchun, Jilin, China but the mod (and test.php) saw it as Australia (APNIC headquarters) and let it through.

Not sure why that would be. Maybe a limitation of the whois function.

vbplusme 01-01-2009 04:13 AM

APNIC is Asia Pacific, not just Australia, FYI

Jim O 01-01-2009 05:01 AM

Quote:

Originally Posted by Jim O (Post 1697163)
Unfortunately it does not seem to be working. For non-ARIN related IP's it defaults to the location of the Regional Internet registry such as RIPE or APNIC. So China IP's appear to come from Australia. I had a registration from China today from IP 58.244.50.212 which localizes to Changchun, Jilin, China but the mod (and test.php) saw it as Australia (APNIC headquarters) and let it through.

Not sure why that would be. Maybe a limitation of the whois function.

Quote:

Originally Posted by vbplusme (Post 1698335)
APNIC is Asia Pacific, not just Australia, FYI

Your point????

FYI, please read my post slowly, it's quoted here in its entirety for your convenience, and then please show me where I said any such thing.

When I went to school I was taught that China was in fact in Asia, not in Australia, so give me just a bit of credit for knowing that APNIC does not refer to Australia alone.

What I said was: "For non-ARIN related IP's it defaults to the location of the Regional Internet registry."

Now just where is APNIC located? I'm not talking about the region it serves but where it is actually located (I even used the word "headquarters" in my post). Uhmm... hmmm... let's see. A quick look at http://www.apnic.net/info/contact/index.html will show they are pysically located in Milton, Brisbane, QLD, AUSTRALIA So Chinese IP's, and in fact all APNIC related IP's appear to be from Australia.

For the same reason, all RIPE related IP's appear to come from the Netherlands. Yes, I know there are many countries served by RIPE beside the Netherlands, but it is located in Amsterdam. So if I wanted to exclude Belarus the adaptation of this modification that I wrote would fail because Belarussian IP's appear, to this modification, to be from the Netherlands, just as Chinese IP's appear to be from Australia. I tested this with multiple IP's from multiple countries for both RIPE and APNIC and the results were 100% consistent.

Now have I made myself clear enough so you won't feel the need to make another drive by off topic comment?

dknelson 01-17-2009 12:09 PM

Has anybody tried this on 3.8?

Sorry, just saw in the first post that this should work on 3.8. I've installed so should know soon. If it works as described, this is a FANTASTIC hack. Thanks much.

dknelson 01-18-2009 11:14 AM

OK....I had previously not moderated new members. I installed this yesterday and this morning found my first member in the moderation que. I have the US and Canada whitelisted. I ran this IP Address through Whois and it shows to be in Texas. Why was this registrant placed into moderation? 76.210.32.55

kfiasche81 01-18-2009 02:56 PM

i have write in the valid country : US,CA,IT
IT= italian
but a new user whit this ip 213.140.16.183 was made on moderation park.

dknelson 01-20-2009 03:08 PM

I love what this mod is SUPPOSED to do but it's just not working for me. It is not correctly identifying the location of the IP addresses. It works for some but I have it set to not moderate users from the USA and Canada but it still puts some of them into moderation. Maybe the one that used the external whois would work better...I'm not sure but think I'll try it.

dknelson 01-21-2009 08:41 PM

I've uninstalled it. Love the concept but it simply doesn't work. It keeps putting people into moderation who are within the countries that I have white listed. Will continue looking for a solution.

kfiasche81 01-26-2009 11:44 AM

Quote:

Originally Posted by dknelson (Post 1719067)
I love what this mod is SUPPOSED to do but it's just not working for me. It is not correctly identifying the location of the IP addresses. It works for some but I have it set to not moderate users from the USA and Canada but it still puts some of them into moderation. Maybe the one that used the external whois would work better...I'm not sure but think I'll try it.

Quote:

Originally Posted by dknelson (Post 1720503)
I've uninstalled it. Love the concept but it simply doesn't work. It keeps putting people into moderation who are within the countries that I have white listed. Will continue looking for a solution.

me too

sweetfunny 01-31-2009 02:36 AM

One solution might be to use the free MaxMind GeoLite Country database locally on your server and run the IP queries against that instead of Arin.net

They also have the free GeoLite City with more resolution, plus a remotely hosted Javascript version you could connect to:

Both have 99.5% accuracy on a Country level, and GeoLite City has 79% on a city level. So there may be something there you can work with.

Jafo232 02-11-2009 04:50 PM

Ok, I have rewrote this application to use zone files. You need to download these files here:

http://www.ipdeny.com/ipblocks/

(choose the all files download).

Their free license prohibits me from including them, plus, you might as well get the most up to date version.

relaxiha 02-12-2009 01:10 AM

does is work on 3.8?

ForumsMods 02-12-2009 01:35 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=205044" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=205044</a>

skwestle 04-11-2009 01:53 AM

I have installed the mod but not sure how to upload the Country's can someone help me upload the folder inside the upload directory to my forum root.

Jamey 09-15-2009 02:47 PM

Thanks...I will try this.

clarkstoncracke 09-22-2009 02:32 PM

I'll start off by saying I'm not gay.

But I think I love you.

//installed.

10-20 bots an hour into moderation.

I love it.

You have no idea how many spam preventing addons we use, and a few still trickle in.

Jafo232 09-22-2009 03:00 PM

Thanks, this mod has saved me so much time, I really am glad it still works.

(yes, still works with 3.8)..

Theo-zzzz 12-08-2009 09:39 AM

Does this work with vb4.0 ?

Jafo232 12-27-2009 01:24 PM

Yes.. Works with 4.0.


All times are GMT. The time now is 05:36 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.01257 seconds
  • Memory Usage 1,852KB
  • 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
  • (2)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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