1
brash
Blocking an IP range due to comment spam?
  • 2006/7/10 23:07

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Hi All,

A few months ago I started being spammed from a porn site in the comments section right across my site. This wasn't a big issue at first as I've set all anonymous comments to admin approval before posting. However the last few weeks it has been getting progresively worse and I'n now getting spammed several times a day.

I was going to just add the comment captcha hack, but seem to be having a little trouble gettig it to work. Only real alternative is to block the IP addresses the spambot is whposting from. It seems that all the offending IP's are coming from the 85.255.112.0 - 85.255.127.255 range which is from a hosting company called Inhoster in the Ukraine. I am basically wanting to block this entire network range (85.255.112.0/20) from Inhoster, and have been using this regex rule in my banned IP list;

^85\.255\.1(1[2-9]|2[0-7])

Problem is it isn't working. Anyone have any ideas where I have gone wrong with this rule?
IT Headquarters
Innovative IT Solutions

2
skenow
Re: Blocking an IP range due to comment spam?
  • 2006/7/11 0:03

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


Have you tried it without the literal slashes?

^85.255.1(1[2-9]|2[0-7])

3
aph3x
Re: Blocking an IP range due to comment spam?
  • 2006/7/11 1:06

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


Lol I was spammed from the exactly IP, ^85.255. worked for me ,and it was done in the same way thorough the comments feature, i was deleting about 30 per day all of them with porn links of somekind
Everything I'm not made me everything I am
The Themes

4
brash
Re: Blocking an IP range due to comment spam?
  • 2006/7/11 2:43

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Quote:

skenow wrote:
Have you tried it without the literal slashes?

^85.255.1(1[2-9]|2[0-7])


Sorry skenow, I should have mentioned that. Yes I have tried without the literal slashes and still no luck. Might just have to use ^85.255. as DefianceB0y pointed out. I was hoping I could block just the offending network range rather than an entire Class B.
IT Headquarters
Innovative IT Solutions

5
SERB-4-LIFE
Re: Blocking an IP range due to comment spam?

Hey i found another way of banning u people, i edited the mainfile.php here is the code.

It goes before anything in the mainfile.php
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

// BANNING System

$ip getenv("REMOTE_ADDR");

if (
$ip=="85.94.106.7" or $ip=="207.200.116.65" or $ip=="207.200.116.5" or strstr($ip,"83.131.130.")) {  
echo 
"<center><b>@ You @</b></center><br>";
echo 
"<center><b>@ Are banned!! @</b></center>";
exit();
}

// End of banning sistem

if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
    
define("XOOPS_MAINFILE_INCLUDED",1);


$ip=="85.94.106.7" here you type in the ip you want to ban
strstr($ip,"83.131.130.") when you want to ban the ip range.

It works great

6
brash
Re: Blocking an IP range due to comment spam?
  • 2006/7/12 22:47

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


That seems to work in a very similar way to the system already built into Xoops, except with yours you are able to direct the user/bot using the banned IP(s) to you a custom page.

Anyway, in the end I could not get XOOPS to ban only the IP range I wanted, so ended up making a compromise and added these to rules;

^85.255.11|^85.255.12

This will still block a lot of IP's that aren't coming from the offending network, but it is WAY better than blocking out an entire class B network.
IT Headquarters
Innovative IT Solutions

7
RachelVirago
Re: Blocking an IP range due to comment spam?

Hi Brash, yes I have had that problem with inhoster, emails to abuse contact are ignored.

So I banned their range and now the chinese networks have started! is there a current list of "bad" networks like this? If not should we start one?

It seems there is a problem with regex functionality with XOOPS more info in particular with ranges.

For full functionality it seems you need to use .htaccess


More info Here
Being transgender is NOT a choice.

8
Peekay
Re: Blocking an IP range due to comment spam?
  • 2006/9/14 19:47

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Have you tried using the regex in Protector module? Maybe it handles better?
A thread is for life. Not just for Christmas.

9
PrezKennedy
Re: Blocking an IP range due to comment spam?

I prefer using Apache to terminate these scum before they even reach my website.

For example, in the .htaccess file in the root of my website, I have this:

<Limit GET>
order allow,deny
allow from all
deny from 195.93.34.11
deny from 200.146.106.74
deny from 80.69.48
.
deny from 217.107.222.16
deny from 85.255.113
.
</
Limit>

ErrorDocument 403 http://google.com/


When you leave the last part of the IP address off, it acts as a wildcard. So for example, anyone coming from 85.255.113.1 to 85.255.113.255 would be redirected to the Error 403 page I selected. I do this, and I never hear from the spammer again.

10
RachelVirago
Re: Blocking an IP range due to comment spam?

Quote:

Peekay wrote:
Have you tried using the regex in Protector module? Maybe it handles better?


IP's banned in preferences automatically appear in protector banned IP's so I guess it's useing the same core routines?
Being transgender is NOT a choice.

Login

Who's Online

142 user(s) are online (88 user(s) are browsing Support Forums)


Members: 0


Guests: 142


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits