PDA

View Full Version : Block Registrations from Specific Countries


VICOS
02-22-2012, 10:38 PM
Has anyone ever modified registration.php to have it check a GEO Database like IP2Nation and block registrations from specific countries, or just block all registrations from outside the USA?

I've coded other programs to do this, but wanted to prevent reinventing the wheel in case anyone else has done it.

A client is getting so many bots hitting the registration.php page that it is placing high loads on the server (the real load is being caused by the program used to generate the captcha image)

Blocking entire countries at the firewall is not practical...some countries have thousands of IP ranges assigned to them.

kh99
02-23-2012, 12:26 AM
There is something called zbblock (it's not a mod here) that blocks a lot of things. The idea is that it blocks before getting to the vb code so that it cuts down on resource use. To be honest I'm not sure if it does exactly what you're looking for, but if you're looking to save coding it yourself you might want to look at it.

VICOS
02-23-2012, 04:01 PM
There is something called zbblock (it's not a mod here) that blocks a lot of things.
Thanks kh99. I took a look and the concept is right on.

Kinda surprised no one else in the vB community has addressed this.

BirdOPrey5
02-23-2012, 07:21 PM
There is a mod: https://vborg.vbsupport.ru/showthread.php?t=205044

zbblock blocked way too much legit traffic in my tests.