Block spam via -jdrop

Discussion of non-phpBB related topics with other phpBB.com users.
Forum rules
General Discussion is a bonus forum for discussion of non-phpBB related topics with other phpBB.com users. All site rules apply.
Post Reply
MontanaBighorn
Registered User
Posts: 49
Joined: Thu May 10, 2007 2:30 am
Location: Montana
Contact:

Block spam via -jdrop

Post by MontanaBighorn » Tue Mar 05, 2019 4:15 pm

I've enabled the registration security questions, but I still get overseas spammers joining my forum. I currently block offending CIDR IP scopes using the -jdrop command on my Linux based router (DD-WRT) but there are around 16,000 CIDR IP scopes that I'd like to block and even if I entered them all manually, my router would have to process each of them every time a user clicks his mouse anywhere on my forum causing unacceptable server response time. Due to the regionally specific content, nobody outside of the US has any reason to access my forums; is there a way I can simply block access to all IP scopes that originate from outside of the US? I'm not even opposed to buying a hardware firewall if it can efficiently block all non-US IP scopes. I'm spending too much time deleting self-validating registrations or trying to research each registration IP to validate it manually. Spam is the biggest problem I face on my forums. I've contacted my ISP to see if they could block all non-US IP scopes before it even reaches my modem and they cannot.
Thanks,

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69452
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Block spam via -jdrop

Post by KevC » Tue Mar 05, 2019 4:17 pm

MontanaBighorn wrote:
Tue Mar 05, 2019 4:15 pm
I've enabled the registration security questions, but I still get overseas spammers joining my forum.
Your question is way too easy.

Anything you can put in to a search engine and find the result for is no good. Make it specific to your site or something that needs some logic and understanding to solve (like asking for a specific word somewhere on the site).
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

MontanaBighorn
Registered User
Posts: 49
Joined: Thu May 10, 2007 2:30 am
Location: Montana
Contact:

Re: Block spam via -jdrop

Post by MontanaBighorn » Tue Mar 05, 2019 5:01 pm

I do appreciate the response, but I don't believe that the solution lies in the questions. I spent over an hour bouncing questions off "Alexa" (Amazon Echo) and never could find one that she couldn't answer. So while the questions might keep out many bot registrations, it's also going to let in many and certainly offers little protection against human spammer registrations. Implementing the questions reduced my spam problem considerably, but it didn't eliminate it. If I could block all non-US based IP scopes entirely, it would offer a total solution. So instead of blocking each IP scope manually, is there a way to block all IP scopes and just create exceptions for US based IP scopes?
Thanks,

User avatar
Lumpy Burgertushie
Registered User
Posts: 66897
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Block spam via -jdrop

Post by Lumpy Burgertushie » Tue Mar 05, 2019 6:00 pm

the problem with that is IPs are not strictly limited to one country alone.

so you could be banning US IPs when you think you are only banning say, russian IPs etc.

if you get the right question it will stop 100% of the bots. if you set the first post to be moderated you will stop almost 100% of the human spammers.

do you really think your current question is going to stop any bot? if you put that question into google guess what is the first response.

you need something about your site specifically. something that only a human actually looking at the page could answer and or something about your subject that only people interested would be able to answer.
for instance:

question: what is the image in the header?
answers: gun, handgun, revolver, snub nosed whatever,

get the idea? no bot would be able to answer that.


by the way, if you need some help getting your board back up and working send me a PM.

robert

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69452
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Block spam via -jdrop

Post by KevC » Tue Mar 05, 2019 8:08 pm

MontanaBighorn wrote:
Tue Mar 05, 2019 5:01 pm
I do appreciate the response, but I don't believe that the solution lies in the questions
It does.
You just have to choose the right kind of question. Anything general knowledge will not work.

Log out and look at the question on this site. Alexa will not be able to answer that.
Human spammers are actually quite rare and as Lumpy says, the newly registered users group will catch them out because they always want to spam with the first post they make so if that post is in a mod queue it never gets seen anyway.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
EA117
Registered User
Posts: 1137
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Block spam via -jdrop

Post by EA117 » Tue Mar 05, 2019 10:09 pm

One additional thought on blocking, is that even though the topic might be specific to laws and rights in a specific region, the contributors or interested parties may still be outside that region. At least for traveling, if not also permanently. Might not be enough to tip the risk / benefit ratio of continuing to block, but just an additional consideration that comes to mind.

Agree the current question seems very easy, and no wonder that Alexa could answer. What about "who makes the device shown on this forum's home page"? Even a human who simply isn't familiar with the manufacturer logo would have to scratch their head for a minute, and try a couple different ones, or need to Google something unrelated to "this forum's home page" as a bot might. Even if the bot was smart enough to pass the forum banner image to Google image search, looks like at best that gets them ".357 snub nose revolver", at least for now.

Does anyone know of a phpBB extension that provides a "we cannot provide service in your country"-type page like many news or content sites have to do? That might be preferable to a literal "drop", by having the code that checks address tables directly controllable within phpBB, and presenting a page of explanation instead of "nothing".

Making the question appropriately human-only still seems like the better (easier, and less overhead) option, though.

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3391
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Block spam via -jdrop

Post by thecoalman » Wed Mar 06, 2019 12:54 am

The stop forum spam extension will drop registrations for IP's/emails from known spammers.

https://www.phpbb.com/customise/db/exte ... orum_spam/

If you want to look into Cloudflare they have numerous ways to block visitors including by country or you can issue a challenge. They also have special header that lists the country, never investigated it but you should be able to at least use it with .htaccess. Performance hit should be negligible since it's very limited amount of countries.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3391
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Block spam via -jdrop

Post by thecoalman » Wed Mar 06, 2019 1:18 am

EA117 wrote:
Tue Mar 05, 2019 10:09 pm
Does anyone know of a phpBB extension that provides a "we cannot provide service in your country"-type page like many news or content sites have to do? That might be preferable to a literal "drop", by having the code that checks address tables directly controllable within phpBB, and presenting a page of explanation instead of "nothing".
If an IP is added to phpBB's ban list they get a specific "your IP has been banned error", that would be editable in the language file. However banning that amount of IP's at any level server side is going to cause performance issues especially through phpBB. If you were using Cloudflare it would be quite easy, wherever phpBB checks for IP ban you could add something like this.

Code: Select all

if ($_SERVER["HTTP_CF_IPCOUNTRY"] !== 'US')
{
//trigger phpBB IP ban error
}
This is just a really quick example, I don't think phpBB allows $_SERVER in script.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

Ozo
Registered User
Posts: 330
Joined: Mon Dec 13, 2010 7:57 pm

Re: Block spam via -jdrop

Post by Ozo » Wed Mar 06, 2019 10:19 pm

Hook CIDRAM onto your forums common.php or ucp.php https://github.com/CIDRAM/CIDRAM#what-is-cidram

Post Reply

Return to “General Discussion”