Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
IP-blocking - to block whole IP-areas of Spammers in .htaccess
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- IP-blocking - to block whole IP-areas of Spammers ...
IP-blocking - to block whole IP-areas of Spammers in .htaccess
21-09-2007 11:00 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hello
Got the impression that some people in e.g. China sit the whole day on their computer and manually spammed my forum. I had cut out the spam-bots with captcha integration into my forum, so that had stopped.
So, I put on the very begin of my .htaccess file in root of ccgi, before the rewrite conditions I have already in the .htaccess file, the following:
<Files *>
order deny,allow
deny from 000.000.000.000
deny from 000.000.000.000/001
deny from 000.000.
deny from domain.tld
</Files>
Got this from here: http://www.webmasterworld.com/forum92/413-3-30.htm
(Thread entry of 2:07 am on Mar. 17, 2004).
The first line blocks one IP-address. In my case this address is all over in forums with juicy entries.
The second line blocks a range of IP-addresses ending 000 to 001.
The third line blocks a whole area of IP-addresses, so the whole of China could be blocked I guess.
The last line blocks a domain.
Any comments?
Got the impression that some people in e.g. China sit the whole day on their computer and manually spammed my forum. I had cut out the spam-bots with captcha integration into my forum, so that had stopped.
So, I put on the very begin of my .htaccess file in root of ccgi, before the rewrite conditions I have already in the .htaccess file, the following:
<Files *>
order deny,allow
deny from 000.000.000.000
deny from 000.000.000.000/001
deny from 000.000.
deny from domain.tld
</Files>
Got this from here: http://www.webmasterworld.com/forum92/413-3-30.htm
(Thread entry of 2:07 am on Mar. 17, 2004).
The first line blocks one IP-address. In my case this address is all over in forums with juicy entries.
The second line blocks a range of IP-addresses ending 000 to 001.
The third line blocks a whole area of IP-addresses, so the whole of China could be blocked I guess.
The last line blocks a domain.
Any comments?
Message 1 of 4
(1,838 Views)
3 REPLIES 3
Re: IP-blocking - to block whole IP-areas of Spammers in .htaccess
21-09-2007 11:17 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
2 things....
1) .htaccess will not protect .php files no matter what you put in it. So PHP based forums cannot be protected
2) What you have given has been tried and does not work! Most likely because PN don't allow that kind of entry within .htaccess.
1) .htaccess will not protect .php files no matter what you put in it. So PHP based forums cannot be protected
2) What you have given has been tried and does not work! Most likely because PN don't allow that kind of entry within .htaccess.
Message 2 of 4
(470 Views)
Re: IP-blocking - to block whole IP-areas of Spammers in .htaccess
21-09-2007 11:24 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
OK, two more questions:
Would that work:
<Limit GET PUT POST>
order deny,allow
deny from 000.00.00.00
</Limit>

Or, I could just redirect the IP:
RewriteCond %{REMOTE_ADDR} ^000.000.000.000
RewriteCond %{HTTP_HOST} !^$
RewriteRule /* http://www.goaway.com/ [R,L]
(From here: http://www.hostvector.com/support/index.php?x=&mod_id=2&root=17&id=99)
That should work.
Would that work:
<Limit GET PUT POST>
order deny,allow
deny from 000.00.00.00
</Limit>

Or, I could just redirect the IP:
RewriteCond %{REMOTE_ADDR} ^000.000.000.000
RewriteCond %{HTTP_HOST} !^$
RewriteRule /* http://www.goaway.com/ [R,L]
(From here: http://www.hostvector.com/support/index.php?x=&mod_id=2&root=17&id=99)
That should work.
Message 3 of 4
(470 Views)
Re: IP-blocking - to block whole IP-areas of Spammers in .htaccess
21-09-2007 11:31 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: ffupi
deny from 000.000.000.000/001
The second line blocks a range of IP-addresses ending 000 to 001.
The third line blocks a whole area of IP-addresses, so the whole of China could be blocked I guess.
Just a quick note (I may be picking you up wrong), but why are you using 001 for the slash notation? if You wanted to block (e.g.) 201.92.89.1, then shouldn't you simply declare that as a deny on its own? Slash notation defines the subnet which should be denied, not a deny range between the two.
Message 4 of 4
(470 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- IP-blocking - to block whole IP-areas of Spammers ...