How to deny abnormal access from Korea



Even though somehow it was Saturday night somehow the load of GIGAZINE rose don dong and started alerting so if I thought of something, what seems to be a lot of trackback spam transmission bots spits out a mysterious IP address I was approaching from the bottom.

124.49.135.22
211.54.82.32
218.154.73.173
220.126.200.207
222.112.92.226
58.79.100.115


Because somehow it can not resolve the host name,http://whois.ansi.co.jp/It was all accessed from the country code "kr", that is, from Korea.

While squirting out a random address, it continually transmits trackback spam without mercy, so I tried putting all of the above address categories in the black list for the time being, but I do not know at what time I will change the IP address ....

So, I thought about a way to refuse all access from South Korea.
Search by Google first.

Htaccess Korea - Google search

As I looked down from the top, there seems to be a list. Just to be sure, although I try to search with a part of the IP address I was attacking this time, the list is out of date or not included. I was in trouble. Somehow I have to get an up-to-date list of IP addresses that are commonly used for Korean spam.

And here I found it.

South Korea refused

I see.http://www.blackholes.us/So I used class assignment information of Korea.

Korea Allocation Class Information

Certainly we have all the IP addresses we've been attacking this time. If this is safe. It may be faster to replace the machining itself with a regular expression in a text editor or the like.

So, if you set this to "http.conf" instead of ".htaccess" it is done. Although it is possible to set it to ".htaccess", it is not recommended because it may slow down the server operation reliably. If it is set to "http.conf", finally you can do "/ sbin / service httpd reload" and reload "httpd.conf" or reload "httpd.conf" with Apache restart end.

Is it perfect if all of this series of work can be done fully automatic on a regular basis ...?

in Note,   Software,   Web Service,   Column, Posted by darkhorse_log