Created
September 25, 2011 13:11
-
-
Save adeel/1240589 to your computer and use it in GitHub Desktop.
Null-route Facebook netblocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# http://bgp.he.net/AS32934#_prefixes | |
import os | |
netblocks = [ | |
"31.13.24.0/21", | |
"66.220.144.0/21", | |
"66.220.152.0/21", | |
"69.63.176.0/21", | |
"69.63.176.0/24", | |
"69.63.184.0/21", | |
"69.171.224.0/20", | |
"69.171.239.0/24", | |
"69.171.240.0/20", | |
"69.171.255.0/24", | |
"74.119.76.0/22", | |
"173.252.64.0/19", | |
"173.252.70.0/24", | |
"204.15.20.0/22"] | |
for n in netblocks: | |
os.popen("sudo route add -net %s 127.0.0.1 -blackhole" % n).read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment