PDA

View Full Version : Can I just block China?


Tom
01-15-2006, 12:30 PM
I don't know anyone in China and don't expect to receive any legitimate mail from there. Analyzing the spam that gets past all the filters, I'll bet 85% of it originates in China; most often chinanet.cn.net. Naturally, it's always a Joe Job (http://www.urbandictionary.com/define.php?term=joe+job), too.

Wouldn't it be nice to somehow just block all IPs from China and be done with it?

basenji
01-16-2006, 04:16 AM
I too would like to know if there is a block list for red China. I dont do business with them just on general principles and all my spam originates from there. I would not miss anything important if China were blocked.

George

Andilinks
01-16-2006, 08:31 AM
And likewise I would like to block visitors to my site from China because I'm certain that real people from there are already blocked, it's only wasteful bots--probably run by the PRC. I routinely block Chinese IP's as I find them and already have a big list but a comprehensive list would be better.

edit: a quick Google on "Chinese IP's" returned this:
http://forum.spamcop.net/forums/lofiversion/index.php/t3994.html

I don't have time to follow it up or dig deeper this morning but I'm sure such a list can be had.

sheila
01-16-2006, 01:37 PM
Here is a site that maintains a list of Chinese and Korean IP addresses:
http://www.okean.com/asianspamblocks.html

The main problem with his data, is that the list is so long, there's no easy way to set up such blocking on a FutureQuest email account.
http://www.okean.com/china.txt

(By "easy way", I mean a point-n-click method that most "clueless" users could easily implement.)

It would require custom scripting.

As an alternative, this suggestion:
http://www.okean.com/antispam/headers.html
could be implemented in EFM (in fact, I do use a similar in EFM myself to block foreign character emails).

Kevin
01-16-2006, 03:03 PM
I wrote this script a while back for my own purposes: http://www.sanitarium.net/unix_stuff/fwnic.txt

It downloads a list of what IP blocks have been allocated to what countries and then firewalls the ones that are allocated outside of the US and Canada. Of course you can't use the script as is because it modifies files in /etc and it uses OpenBSD's pf firewall rules but maybe you can modify it into a .htaccess generator or something.

basenji
01-17-2006, 07:24 AM
I found a list that has ranges (of all the high order bits) of the Chinese IP addresses:

http://www.okean.com/antispam/iptables/iptables.html
&
http://www.okean.com/antispam/cisco/sinokoreanacl.html

Writing a routine in this environment for this is not in my expertise but if someone would, it would be cool.

George

Andilinks
01-17-2006, 11:04 AM
Thanks George, I knew that list existed somewhere.

Unfortunately it is too large to insert into my .htacess in its entirety, but at least I can block (larger) entire ranges with a single line without worrying that I'm also blocking local traffic. It would be nice if that could be done at the server level, just another incentive to get a dedicated server.

My email spam is less of a problem, but I'll also be interested to hear if others are able to use the list for that.

Andi