Stop Spam and Hackers IP Blacklist for WordPress
These IPs will try to spam your comments and try to find week spots in .php files, it is better to apply full ip bann: Range specified with hyphen (dash), ex: 20.192.0.0 – 20.255.255.255
Info:
We will update the list every day if is possible.
This ips will try to:
- Spam comments
- Attempt to access prohibited URL for vulnerabilities: wp-config.php, admin.php, /env/ etc…
See the full IPs list:
2.58.56.122
3.1.109.202
3.129.88.109
3.132.213.15
3.141.6.213
3.142.194.198
3.143.212.89
4.150.4.182
4.150.46.94
4.150.56.104
4.229.227.188
4.240.112.137
5.39.90.92
5.135.50.66
5.161.114.235
5.161.123.13
5.176.138.137
5.188.62.26
5.188.62.76
5.188.87.36
5.196.77.223
5.196.176.254
5.254.23.54
8.142.168.136
8.210.142.184
13.77.68.214
13.82.81.116
13.84.151.189
13.114.106.30
15.204.170.27
15.228.212.152
20.0.39.21
20.1.164.178
20.2.83.192
20.2.240.166
20.7.25.130
20.10.178.106
20.10.184.16
20.22.245.39
20.24.194.30
20.25.33.9
20.25.65.158
20.42.111.11
20.46.48.50
20.67.103.90
20.68.146.217
20.69.17.105
20.83.188.5
20.85.123.109
20.97.20.80
20.97.60.53
20.114.70.11
20.115.97.21
20.122.64.158
20.125.140.216
20.127.145.238
20.150.148.23
20.150.218.12
20.163.40.61
20.163.104.4
20.165.217.192
20.168.75.68
20.169.80.154
20.197.3.65
20.198.4.76
20.198.77.190
20.198.79.253
20.199.10.161
20.201.123.217
20.203.181.103
20.203.181.153
20.203.181.220
20.203.182.148
20.203.183.112
20.204.26.182
20.204.30.82
20.204.68.34
20.210.183.226
20.213.12.252
20.215.192.69
20.216.146.80
20.219.2.242
20.219.15.26
20.219.52.92
20.219.112.92
20.219.167.125
20.219.188.145
20.219.195.153
20.227.161.118
20.228.143.110
20.230.94.40
20.230.103.89
20.231.221.108
20.232.101.84
20.235.76.71
20.239.65.179
20.242.30.247
20.242.68.106
20.242.95.63
20.243.253.74
20.248.195.136
23.94.191.226
23.101.118.151
23.101.150.48
23.101.181.197
23.101.181.237
23.128.248.29
23.128.248.35
23.254.204.229
27.124.45.54
31.5.229.23
34.77.172.240
34.148.120.237
34.229.179.23
37.35.65.162
37.140.223.234
37.221.92.163
37.251.222.173
38.132.122.246
40.71.127.72
40.76.188.216
40.77.94.16
41.87.64.210
42.0.30.155
42.119.230.250
43.128.70.137
43.128.80.170
43.128.87.172
43.128.96.6
43.128.103.165
43.128.104.137
43.130.28.64
43.130.109.24
43.130.120.100
43.130.135.10
43.130.243.163
43.133.0.33
43.133.40.66
43.133.46.195
43.133.46.200
43.133.47.166
43.133.60.96
43.133.214.137
43.134.7.159
43.134.10.36
43.134.64.133
43.134.82.41
43.134.109.20
43.134.110.26
43.134.130.133
43.134.132.179
43.134.162.83
43.134.171.180
43.134.190.210
43.134.229.114
43.134.231.13
43.135.167.21
43.152.217.200
43.152.220.70
43.153.30.206
43.153.33.242
43.153.94.203
43.153.205.61
43.153.219.32
43.153.227.42
43.154.98.112
43.156.16.250
43.156.17.56
43.156.63.217
43.156.93.5
43.156.104.128
43.156.108.155
43.156.109.28
43.156.114.220
43.156.138.159
43.156.145.173
43.156.179.124
43.156.188.235
43.156.204.132
43.156.210.127
43.156.216.50
43.156.232.32
43.159.61.31
43.159.143.66
43.231.29.167
43.231.234.9
43.255.113.232
44.212.238.110
45.12.253.198
45.15.72.190
45.61.128.46
45.61.185.37
45.61.186.104
45.61.186.203
45.61.187.81
45.76.143.193
45.80.158.221
45.81.39.129
45.81.39.196
45.81.39.199
45.81.39.200
45.81.39.208
45.81.39.209
45.92.1.148
45.92.1.155
45.95.169.225
45.95.187.186
45.126.124.113
45.126.125.72
45.126.126.180
45.126.126.246
45.137.203.13
45.140.90.74
45.140.91.179
45.141.215.58
45.141.215.61
45.154.98.14
45.154.98.198
45.154.98.214
45.162.57.223
45.248.76.190
45.248.76.204
46.37.169.187
46.97.177.158
46.161.14.84
46.161.14.104
46.161.15.14
47.87.221.106
47.88.5.56
47.88.90.156
47.90.137.113
47.251.11.3
47.251.13.32
47.254.85.182
49.49.218.3
50.35.124.70
50.116.87.125
51.38.27.102
51.68.11.215
51.77.110.107
51.89.22.139
51.89.157.229
51.107.8.252
51.140.223.155
51.142.146.242
51.178.36.108
51.222.44.188
51.222.186.103
51.254.213.67
52.74.155.156
52.77.83.52
52.141.90.132
52.141.91.103
52.141.91.188
52.141.94.229
52.159.101.21
52.165.36.235
52.172.253.215
52.247.31.110
52.247.61.253
52.247.62.52
52.247.62.58
52.247.115.158
52.251.123.65
54.146.204.147
54.183.53.31
57.128.18.16
57.128.86.60
60.18.37.43
60.18.37.189
60.18.38.99
60.18.115.232
61.176.86.7
62.151.178.45
62.210.245.181
64.38.250.181
64.124.8.31
64.124.8.33
64.124.8.48
64.124.8.131
64.124.8.148
64.124.8.156
64.124.8.170
64.124.8.191
66.37.4.138
66.115.189.192
67.205.191.23
68.183.222.42
69.167.6.238
69.167.12.25
69.167.12.34
69.167.12.37
70.37.59.153
74.80.208.13
74.208.80.140
74.234.62.106
75.119.133.235
75.119.150.252
77.83.1.147
78.47.64.33
78.138.31.29
82.202.162.88
82.223.15.184
84.17.0.0
84.17.35.94
85.10.156.104
85.202.87.242
85.217.144.38
85.234.139.184
87.120.88.16
87.120.88.20
87.121.221.173
87.121.221.222
87.249.133.99
89.33.44.247
89.146.141.254
89.187.163.137
89.187.163.213
89.187.163.218
92.205.48.177
92.205.48.232
93.122.0.0
94.102.208.129
95.158.43.34
95.214.27.21
95.214.27.159
95.214.27.212
96.9.211.100
102.68.76.193
103.80.38.12
103.83.81.159
103.83.81.166
103.98.214.69
103.124.225.212
103.153.182.104
103.216.188.68
103.241.64.156
104.43.229.234
104.164.173.156
104.164.173.213
104.208.29.120
104.210.149.121
104.210.149.193
104.210.223.148
104.238.214.207
104.244.77.23
105.68.239.125
107.191.56.235
108.167.151.80
109.166.0.0
109.234.162.58
109.237.96.179
109.237.98.53
110.14.63.77
110.235.239.171
113.228.136.75
113.231.195.38
119.28.111.168
119.252.152.150
124.156.7.247
124.156.34.168
124.156.49.128
124.248.69.75
124.248.69.111
124.248.69.145
125.163.150.83
128.140.14.68
128.199.78.123
129.226.91.6
129.226.203.166
129.226.211.49
132.145.9.189
134.249.61.142
135.125.205.117
136.158.79.65
136.243.216.232
136.243.216.235
138.68.64.107
138.94.56.124
138.197.223.80
138.199.22.154
139.59.240.67
139.99.78.98
139.99.79.216
140.210.18.229
141.94.168.148
141.94.175.130
141.98.6.47
141.98.6.198
142.44.129.185
142.202.48.16
143.92.52.184
143.198.216.93
143.244.47.100
144.76.62.188
144.217.135.249
146.70.192.158
146.190.81.159
146.190.94.97
147.78.47.249
147.124.213.3
149.56.150.242
150.109.7.254
150.109.13.140
152.89.196.77
154.28.229.98
156.146.33.68
157.7.104.93
157.55.183.169
157.143.146.99
157.230.238.184
157.230.254.108
157.245.57.249
157.245.107.85
157.245.153.247
157.245.207.140
158.101.151.135
158.255.78.78
159.69.142.174
159.223.173.153
161.35.1.63
161.97.130.63
162.19.71.0
162.144.85.198
162.240.239.98
165.22.240.105
165.232.165.141
165.232.165.143
167.99.107.229
167.114.24.140
167.114.173.203
167.235.19.20
168.138.160.219
170.106.119.29
170.106.119.125
170.187.234.47
171.224.181.205
172.174.15.128
172.177.11.133
172.177.11.143
172.177.46.250
172.177.109.156
172.177.148.116
172.177.174.237
173.212.226.187
174.138.16.153
178.62.219.65
178.128.21.224
178.128.95.169
178.159.37.10
178.159.37.41
178.208.160.89
178.222.172.59
178.223.236.40
178.238.10.33
178.238.10.193
178.239.163.80
181.215.176.15
185.29.8.208
185.132.39.83
185.174.159.243
185.196.220.26
185.198.190.99
185.199.223.22
185.225.74.152
185.241.208.169
185.241.208.236
185.246.222.14
185.254.37.149
188.40.238.74
188.165.22.2
189.126.111.130
190.131.109.78
190.203.253.97
192.64.4.26
192.71.2.171
192.185.82.134
192.185.83.79
193.56.29.113
193.201.8.40
194.26.192.90
194.26.192.189
194.38.20.254
194.38.21.214
194.55.224.172
194.87.151.73
194.113.235.171
194.163.137.108
194.169.175.93
194.169.175.158
194.169.175.167
197.248.196.225
198.98.57.136
206.189.151.68
210.116.91.94
213.21.209.34
213.166.86.115
216.83.44.153
217.146.82.237
217.160.54.94
2001:861:8ace:8350:211:32ff:fe13:8ba1
2001:9a8:62:0:87:233:157:194
2001:19f0:6001:578a:5400:4ff:fe6f:3f2c
2001:41d0:8:d29b::1
2001:41d0:305:1000::151c
2001:448a:10c9:38c7:e1a8:c861:4972:57fc
2001:448a:4042:4a73:140f:7b8:5a39:10c8
2401:c080:2400:1fe1:5400:4ff:fe46:1962
2403:6200:88a4:898f:f8ae:2419:856:aa8f
2406:da1a:a45:8200:33ea:a2f5:b38a:eb7e
2600:1f16:583:2d00:7269:2826:beb2:6613
2600:3c00::f03c:93ff:fe60:efe7
2603:8081:1000:1cd7:f547:105b:374b:66d
2604:a880:400:d0::17b7:8001
2804:14c:87b9:9b80:5903:bb7f:bb74:36df
2804:13d0:9924:bb00:5cb3:53c1:2f1:bf98
2804:15fc:3000:8101:854f:396d:e31e:5634
2a00:1fa1:8231:d9bf:520:f88c:b44f:ab34
2a01:4f8:11d:1000::2b11:12
2a01:4f8:192:440f::2
2a01:4f9:c011:b4f9::1
2a02:a58:865f::
2a02:c205:2012:8084::1
2a02:c500:2:83::
2a03:4000:0:3b4:9452:aaff:fe60:eccb
2a10:cc45:100:0:5474:5a49:bfd6:2007
How to Block IP Address with .htaccess
Quick post today showing some different ways to block visitors via their IP address. This can be useful for a variety of reasons, including stopping some stupid script kiddie from harassing your site, or preventing some creepy stalker loser from lurking around your forums, or even silencing the endless supply of angry trolls that never seem to get a clue. So many reasons why, and so many ways to block them. Continue reading to learn how to block any IP address using a thin slice of .htaccess.
Block a specific IP address
This is the one that most visitors to this page will want to use:
Deny from 123.123.123.123
Just change the IP address to the one that you want to block, and then add the code to your site’s root .htaccess file.
Block a specific domain
To block a specific domain, add the following to your site’s root .htaccess file:
Deny from 123.123.123.123/255.255.255.0
Then change the IP address and netmask values to match the domain that you want to block.
Block multiple IP addresses
If you’ve got more than one IP address that you would like to block, you can deny them all at once:
Deny from 111.111.111.111 222.222.222.222 333.333.333.333
This will block the three specified IPs: 111.111.111.111
, 222.222.222.222
, and 333.333.333.333
. Edit the IPs to match the ones that you want to block, and then add the line to your .htaccess file.
Block entire subnet
It’s also possible to block an entire range of IPs. Here is an example where we block every IP that begins with 123.123
:
Deny from 123.123
To block multiple ranges, we can do this:
Deny from 111 222.222 333.333.333
Once you get the pattern, the sky’s the limit. Just be mindful of what you’re doing; blocking an entire range of IPs is serious business.
Block IP based on CIDR
If you know the specific CIDR for the IP that you are trying to block, you can use this syntax:
Deny from 123.123.123.0/24
As with all of these rules, you can edit to match your target and then add to .htaccess.
Block IPv6 addresses
IPv6 addresses are more commonly used every day. If you want to block one via .htaccess, here is the proper syntax:
Deny from 2001:0db8:0000:0042:0000:8a2e:0370
You can also use either of these notations, depending on the target:
Deny from 2001:0db8:0000:0042
Deny from 2001:0db8:0000:0042:0000/10
Block IP based on regular expression
This IP-blocking method tests all addresses against a predefined regular expression via RewriteCond
/RewriteRule
directives:
<IfModule mod_rewrite.c>
RewriteCond %{REMOTE_ADDR} ^214.53.25.(6[4-9]|7[0-9]|8[0-9]|9[0-9])$ [OR]
RewriteCond %{REMOTE_ADDR} ^214.53.25.1([0-1][0-9]|2[0-8])$
RewriteRule .* - [F]
</IfModule>
There is probably a more efficient way to write the regular expressions in the previous example, but that should definitely get the job done.
Redirect based on IP address
Instead of blocking visitors based on IP address, you can redirect them to another location. Here’s how to do it using Apache’s mod_rewrite
:
<IfModule mod_rewrite.c>
RewriteCond %{REMOTE_ADDR} ^111\.111\.111\.111$
RewriteRule .* /index.php [R=301,L]
</IfModule>
You can change the IP of course to match the one you are targeting. And then edit the /index.php
to match the URI to which any matching requests should be sent. Here is another example to help illustrate the technique:
<IfModule mod_rewrite.c>
RewriteCond %{REMOTE_HOST} 123\.123\.123\.123
RewriteCond %{REQUEST_URI} /requested-page\.html
RewriteRule .* /just-for-you.html [R=301,L]
</IfModule>
Here we are checking the IP and the requested URI. If there’s a match, then the request will be sent to /just-for-you.html
. To use this redirect, simply edit the IP address, requested page, and redirect page. Copy and paste the code into your .htaccess file and upload to your server.
Block specific request types
Let’s say that you only want to block some visitor from, say, posting content via a form on your site. That can be done by using Apache’s <Limit>
container:
<Limit POST>
Order Allow,Deny
Allow from all
Deny from 123.123.123.123
</Limit>
Notice the POST
specified in the <Limit>
container? That’s the key, and you can change that to target any request type.
Here is an example of the inverse case, where we want to allow posting from only our own IP address, while denying POST
requests for everyone else:
<Limit POST>
Order Deny,Allow
Deny from all
Allow from 111.111.111.111
</Limit>
Notice the reversal of the Order
directive: here we are denying first, then allowing, which provides the logic required for this technique.
Complete notation
While it’s fine to simply add a single line, like Deny from 123.123
in your .htaccess file, there is a more complete syntax that can be used. Here are a couple of examples:
Order Allow,Deny
Allow from all
Deny from 123.123.123.123/26
Notice the extra logic involved with this more “correct” syntax: here we are specifying the Oder
directive, which enables us to change Apache’s default order, which is Allow,Deny
. So when we include only a single Deny from
line (as in our previous examples), it works because we are using the default order of Allow,Deny
. That’s why it’s fine to exclude the extra lines. Or, if desired, we could change the order explicitly:
Order Deny,Allow
Deny from all
Allow from 111.111.111.111
Here we first deny access to everyone, and then allow only the specified address. Combining this syntax with the <Limit>
container, we can do cool things like enable POST and PUT requests only from our own IP address. For example:
<Limit POST PUT>
Order Deny,Allow
Deny from all
Allow from 111.111.111.111
</Limit>
Combining these techniques with previous examples, your IP-blocking powers are complete.
Reminder
Remember to always make a backup of anything that you intend to modify, and then test well before going live with any new rules. Play it safe and have some fun.
List updated today!!!
List updated today!!!
List updated today!!!