Just download:
http://www.okean.com/antispam/iptables/rc.firewall.sinokorea
This script that can be downloaded regularly needs to be converted before it can be used.
In this list the destination ports is 25 (SMTP). For web access blocking, the port needs to be changed
to 80,443,25,110,22,995 etc. . A small script can be used to get the list, convert it before including it in a firewall.
Or simply to block access to ALL service from thoseChinese and Corean IPs then use the CIDR list located at:
http://www.okean.com/sinokoreacidr.txt
Heere is site that shows the way ro convert an IP Number to a Dotted IP
http://ip-to-country.webhosting.info/node/view/55
Here is the address to get the IP Number per country:
http://ip-to-country.webhosting.info/downloads/ip-to-country.csv.zip
$dotted_ip_address = long2ip($ip_number);
Thus function seems NOT to exist in PHP5 so here is a replacement:
—————————————————————
if (!function_exists("long2ip")) {
function long2ip($long) {
// Valid range: 0.0.0.0 -> 255.255.255.255
—————————————————————-
if ($long < 0 || $long > 4294967295) return false;
$ip = "";
for ($i=3;$i>=0;$i--) {
$ip .= (int)($long / pow(256,$i));
$long -= (int)($long / pow(256,$i))*pow(256,$i);
if ($i>0) $ip .= ".";
}
return $ip;
}
}
?>
If your email server can do content filtering the use the following content types:
————————————————–
Content-type: text/html; charset=big5*
Content-type: text/html; charset="ks*
Content-type: text/html; charset="euc-kr*
Content-type: text/html; charset="gb2312*
Content-type: text/html; charset=EUC-TW*
Content-type: text/html; charset=iso-2022-kr*
Content-type: text/html; charset=KS_C_5601-1987*
————————————————–