On 11/26/07, Zeth Green wrote:
> mostly seem to spam the wiki with Chinese spam
If you have your site on a Linux server, you can delete users in bulk
by logging on in Terminal and using a "find" command with grep and
-delete. I was deleting hundreds of users this way, but have since
retired the command I was using. I haven't had a Chinese spammer in
about a month. Here's how I did it:
Go your your Apache .htaccess file and add text like this:
##
Options +FollowSymLinks
RewriteEngine On
# Block unreferred scripts from creating accounts
RewriteCond %{REQUEST_URI} UserPreferences
RewriteCond %{HTTP_REFERER} ^$
RewriteRule/UserPreferences - [F]
# Block Asian ISPs from creating accounts
RewriteCond %{REMOTE_ADDR} ^58 [OR]
RewriteCond %{REMOTE_ADDR} ^123 [OR]
RewriteCond %{REMOTE_ADDR} ^125 [OR]
RewriteCond %{REMOTE_ADDR} ^210 [OR]
RewriteCond %{REMOTE_ADDR} ^219 [OR]
RewriteCond %{REMOTE_ADDR} ^220 [OR]
RewriteCond %{REMOTE_ADDR} ^221 [OR]
RewriteCond %{REMOTE_ADDR} ^222
RewriteRule /UserPreferences - [F]
##
The first block looks for scripts that come from no referrer URL, and
blocks them from the UserPreferences page regardless of ISP. This
amounts to about 10% of my account creation attempts. Any user who
comes from any page on the site is still allowed to register, so don't
tell the script writers that secret.
The second block prevents any Chinese IP address from loading the
UserPreferences, which prevents them from creating an accounts.
Chinese users can browse your site normally, but legitimate Chinese
users cannot create accounts either.
This is an extremely efficient system. I have seen my server load drop
considerably, since the "Forbidden" page returns zero bytes of data.
By examining my server log, I see that the spammers have mostly quit
trying, since the site is not a payoff for them.
-- Gnarlie
http://Gnarlodious.com/Gnarlodious
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Moin-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/moin-user