Fighting Spam
21st of March, 2006
For many sites spam is a major problem, it used to be a big problem at Hvassing.com as well. That was before restrictions were made and the spammers were denied access.
This article assumes that you have some basic knowledge on how your Apache web server works. Furthermore, the information here is offered as is and without any warranty what so ever that it'll work. Use at your own risk. That said; it should work, but don't sue me if it doesn't.
Denying access to a domain or site is not as difficult as it sounds, at least not on the Apache web server. Apache lets you deny access to a specific IP-address, a hostname or even an entire tld ("top level domain", such as .com or .gov). The two latter ones should be used with caution as they might deny more than you want.
To deny access to all visitors from one specific IP-address simply create a .htaccess-file in the document root of your site with the following information:
Order allow,deny
Deny from 123.456.789.123
Allow from all
The second line, Deny from 123.456.789.123, is the one that does the job. This tells Apache that visitors with the IP-address 123.456.789.123 should be denied access. The third line grants access to everyone else.
Using this one can easily prevent spammers from even accessing the site, simply stopping them at the front door if you like. However, in order to do this either a domain or an IP-address of the spammer is needed. Luckily enough, good people like Martin Bekkelund have already collected many such IP-addresses. This makes the job of denying access a whole lot easier.
Nudge your favourite text-editor awake and insert the following, which is a merged list of IP-addresses from Martin Bekkelund's list and my own. The list comprises of roughly 75 unique IP-addresses.
Order allow,deny
Deny from 125.247.102.210
Deny from 148.244.150.52
Deny from 148.244.150.57
Deny from 148.244.150.58
Deny from 148.244.153.253
Deny from 167.206.72.176
Deny from 168.143.113.41
Deny from 168.143.113.53
Deny from 193.145.56.193
Deny from 193.213.31.172
Deny from 194.117.134.72
Deny from 195.205.195.131
Deny from 195.39.170.102
Deny from 195.96.144.45
Deny from 196.7.0.160
Deny from 198.185.134.90
Deny from 199.203.54.151
Deny from 199.94.20.180
Deny from 200.112.119.228
Deny from 200.163.18.82
Deny from 200.213.78.81
Deny from 200.30.104.242
Deny from 200.63.80.253
Deny from 201.245.172.11
Deny from 202.101.173.68
Deny from 202.188.158.130
Deny from 202.56.253.183
Deny from 202.58.86.5
Deny from 203.140.175.18
Deny from 203.160.244.229
Deny from 203.169.250.29
Deny from 203.172.179.36
Deny from 203.82.38.66
Deny from 204.85.15.47
Deny from 207.248.240.118
Deny from 207.248.240.119
Deny from 208.27.112.133
Deny from 210.128.142.42
Deny from 210.173.179.77
Deny from 211.110.198.143
Deny from 211.253.183.18
Deny from 211.253.184.130
Deny from 211.253.191.114
Deny from 211.44.92.130
Deny from 211.55.133.169
Deny from 212.138.47.29
Deny from 212.24.224.10
Deny from 212.87.234.1
Deny from 213.139.47.84
Deny from 216.126.141.38
Deny from 216.75.82.242
Deny from 217.17.41.72
Deny from 217.219.155.194
Deny from 218.248.1.13
Deny from 218.56.32.230
Deny from 219.149.233.179
Deny from 19.168.92.102
Deny from 219.93.174.103
Deny from 220.65.210.42
Deny from 220.71.178.59
Deny from 220.71.92.63
Deny from 61.25.150.231
Deny from 61.252.238.199
Deny from 62.0.13.2
Deny from 62.128.250.198
Deny from 64.193.120.56
Deny from 65.160.122.209
Deny from 65.160.122.217
Deny from 65.165.84.11
Deny from 68.87.64.117
Deny from 68.87.64.118
Deny from 68.87.77.180
Deny from 80.123.209.147
Deny from 80.191.129.71
Deny from 80.21.56.90
Deny from 80.58.2.46
Deny from 80.58.4.46
Deny from 81.168.158.139
Deny from 81.226.219.145
Deny from 82.185.124.122
Deny from 82.227.132.35
Deny from 83.217.70.164
Allow from all
0 Responses to “Fighting Spam”
Leave a Reply