Definite's Extractor

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: