Created
April 5, 2016 13:13
-
-
Save timss/1be582353f679282c60a546749afa4b7 to your computer and use it in GitHub Desktop.
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
# Block facebook.com mon-fri, 08:00 - 17:00, from desktop net | |
# Fetches all subnets registered to Facebook and it's domain aliases | |
for i in $(whois -h whois.radb.net -- '-i origin AS32934' | | |
awk '/^route:/ { if(!uniq[$2]++) print $2 }'); do | |
$ipt -A FORWARD -s $desktop_net -d $i \ | |
-m time --timestart 08:00 --timestop 17:00 --weekdays Mon,Tue,Wed,Thu,Fri \ | |
-j DROP | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment