block China and other South Asian countries at the firewall level
Shell Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rules
scripts
README.md
blocklists.txt
generate.pl

README.md

chamfilter

Block China and other South Asian countries at the firewall level.

Why?

Because nearly all forum and blog spam originates from China and the big Chinese ISPs do precious little to combat it.

Requirements

iptables and, if you want to build the rules files yourself, perl.

Usage 1

As root run one or more of the scripts in the scripts/ directory. Example:

sh scripts/block-china.sh

The scripts do not flush the filter table. If you somehow mess up, run iptables -F and try again.

Usage 2

Paste one or more of the file in the rules/ directory into your iptables.rules file and apply it with iptables-restore. Easy, right?

Thanks

The rulesets are based on this blacklist.