5 Ways To Block A Spammer & Splogger By IP Address From WordPress Blogs
By Angsuman Chakraborty, Gaea News NetworkSaturday, June 28, 2008
For regular spammers and sploggers, banning their IP address is a simple and effective way to get rid of them. I will describe three methods here with the simplest at the very end. Let’s take a simple case study. ntoolz.net has been copying my posts with an automated content creation tool and then blessing me with a pingback for his splog content! So I decided to ban him.
Method 1: Ban IP Using Firewall
A simple nslookup revealed his IP address -
$ nslookup ntoolz.com Server: 4.2.2.1 Address: 4.2.2.1#53 Non-authoritative answer: Name: ntoolz.com Address: 38.113.185.202
I can then use iptables to ban him -
iptables -A INPUT -s 75.126.153.164 -j DROP
This bans his IP address from accessing my network. However after a reboot of my server this ban will go away. For a permanent ban you will need to additionally add this command to your /etc/rc.local file. This ensures that the ban is in effect even after a reboot of my server.
– Source.
Advantage:
1. Permanent ban
2. Bans commenting as well as fetching posts
3. Doesn’t require restarting the Apache server
Dis-advantage:
1. Bans him from viewing your blog which you may not want.
2. More complicated to implement than the other methods described below. iptables is a dangerous beast. If you make a mistake you may end up being blocked from your own server and trust me it isn’t very hard to do.
3. Can be circumvented by using proxy server to post comments or fetch content.
Method 2: Ban Using Apache Web Server
.htaccess
You can create / edit the .htaccess file in your web document root directory, to block these IP addresses from that directory and its sub-directories, as follows:
order allow,deny #One line per IP address, replace xxx.xxx.xxx.xxx with the IP address you want to ban deny from xxx.xxx.xxx.xxx deny from xxx.xxx.xxx.xxx allow from all
Advantage:
1. Permanent ban
2. Bans commenting as well as fetching posts
3. Simpler than IP banning and less dangerous
4. Doesn’t require restarting HTTP server like httpd.conf method.
Dis-advantage:
1. Bans him from viewing your blog which you may not want.
3. Can be circumvented by using proxy server to post comments or fetch content.
httpd.conf
Same as above but you have to make the change in /etc/httpd/conf/httpd.conf file. Restart the server for the change to take effect. This method is slightly more complex than changing .htaccess file but is more flexible and gives better performance.
Advantage:
1. Permanent ban
2. Bans commenting as well as fetching posts
3. Simpler than IP banning and less dangerous
Dis-advantage:
1. Bans him from viewing your blog which you may not want.
3. Can be circumvented by using proxy server to post comments or fetch content.
4. Requires restarting the Apache HTTPD server
Comment Guard Pro
In Comment Guard Pro (WordPress plugin for comment spam protection) banning is a simple matter of checking the IP address of the offending comment and clicking on Update. You can ban any number of IP addresses easily with this point-and-click interface. Also if you have received multiple spams from a single IP address, you can delete all of them by clicking on Recheck Queue for Spam after you have blacklisted the IP address as described above.
Note: You can use the interface to also ban by URL
Advantage:
1. Permanent ban as others
2. Bans commenting only and not viewing of posts
3. Simplest of all the options, user friendly and very easy to manage
4. Doesn’t require restarting the Apache server
5. Can ban by URL of the offending site. While IP address ban can be overcome by using proxies, you cannot overcome URL ban because advertising the URL is the ultimate objective of spammers.
6. Integrated with WordPress and works as WordPress plugin, so you can manage it completely from WordPress administration console
7. Doesn’t require any special access to server and works very well on shared hosting (with limited access rights) as well as high-end dedicated hosting.
Dis-advantage:
1. The plugin is not free, it has a one-time cost of 30$. However comes with lifetime free update and upgrades. There are many more reasons to choose Comment Guard Pro. So I am not sure if that is a dis-advantage or advantage
Tags: IP address ban, Spam Watch, Spammer, Splog, Splogger
April 29, 2009: 5:58 am
I Found the Ip-address details on the website |
venkat20