Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Tag Archives: iptables

HOWTO: Block Google to simulate the Google-less environment

Some Chinese Zanata users report they cannot use Zanata in China.

In order to simulate the environment, I run following script:

iptables -I INPUT -s 64.233.160.0/16 -j DROP
iptables -I INPUT -s 66.249.64.0/16 -j DROP
iptables -I INPUT -s 72.14.192.0/16 -j DROP
iptables -I INPUT -s 74.125.0.0/16 -j DROP
iptables -I INPUT -s 209.85.128.0/16 -j DROP
iptables -I INPUT -s 216.58.0.0/16 -j DROP
iptables -I INPUT -s 216.239.32.0/16 -j DROP

Since I just want a quick environment to simulate the Google-less users, nor do I obtained the exact blocked IP ranges,  I did not spend much time on fixing false positive and false negative of these IP ranges.  So do check whether your web services are fallen with in the range before you test it.

Reference:

https://bugzilla.redhat.com/show_bug.cgi?id=1186084

Advertisements