In 2014, my small website was frantically flushed by a large number of spam IP addresses from Putian, Fujian province, with dozens of times of traffic per minute and a large number of spam comments. I checked the news on the internet. Many small blogs and forums have been wildly refreshed, and they are all from the IP address of Putian, Fujian. Small websites are all virtual hosts, the traffic is also lost. Anti-war my website failed. I got down for dozens of times a day. Then I asked me about Zhang, so that I knew that the CPU was too high. I only checked it to know that my website was being refreshed.
After several days of anti-spam, I was unable to handle spam comments. I decided to use the function proxy to prevent spam comments from being written. However, I was unable to cope with frequent flash attacks and was not able to go down. After several days of fighting, I decided to block it completely.
I checked on the internet and found that there were a lot of people who had been flushed into the website. For more information, see.
The blocking principle is to use Cpanel to prohibit spam IP addresses from accessing the website and return 403. It is no longer possible to write spam comments. This is the most effective method currently.
I searched for the spam IP address from Putian, Fujian province, and obtained the spam IP address list from the access logs of this site. htaccess is blocked. You can also use Cpanel's "block IP access" command to directly process it. The test basically shields more than 95% of my websites, and many people miss the network, which will be updated in the future.
Now we will share the organized IP segments with you. Please test and update them.
The code is as follows: |
Copy code |
Order deny, allow Allow from all Deny from 110.82 Deny from 110.85 Deny from 110.86 Deny from 110.89 Deny from 112.111 Deny from 113.128 Deny from 117.26 Deny from 120.33 Deny from 120.37 Deny from 120.40 Deny from 120.43 Deny from 121.205 Deny from 125.78 Deny from 175.44 Deny from 218.86 Deny from 220.161 Deny from 222.77 Deny from 222.79 Deny from 27.150 Deny from 27.153 Deny from 27.159 Deny from 36.248 Deny from 36.250 Deny from 59.58 |
Note: deny from 110.82 indicates that all IP addresses of 110. 82. ×. × are blocked.
It is best to note that if it is the same IP segment, we can write it like this
Some IP addresses
Example:
The code is as follows: |
Copy code |
Allow from 10.1 |
The starting 1 to 3 bytes of the IP address, used for subnet restrictions.
Network/mask pair
Example:
The code is as follows: |
Copy code |
Allow from 10.1.0.0/255.255.0.0 |
A Network a. B. c. d, and a mask w. x. y. z. Used for more precise subnet restrictions.
No Inter-Domain Routing specification for network/nnn
Example:
The code is as follows: |
Copy code |
Allow from 10.1.0.0/16
|
Similar to the previous case, the mask consists of nnn high-level bytes.
Note that the last three examples match the same group of hosts.
The IPv6 address and IPv6 subnet can be specified as follows:
The code is as follows: |
Copy code |
Allow from fe80: a00: 20ff: fea7: ccea Allow from fe80: a00: 20ff: fea7: ccea/10 |