30

Block all FaceBook traffic Using awk, echo, grep, iptables, sudo, whois

 4 years ago
source link: https://www.commandlinefu.com/commands/view/16096/block-all-facebook-traffic
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ASN=32934; for s in $(whois -H -h riswhois.ripe.net -- -F -K -i $ASN | grep -v \"^$\" | grep -v \"^%\" | awk '{ print $2 }' ); do echo \" blocking $s\"; sudo iptables -A INPUT -s $s -j REJECT &> /dev/null || sudo ip6tables -A INPUT -s $s -j REJECT; done - (Block all FaceBook traffic ). The best command line collection on the internet, submit yours and save your favorites.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK