Created
September 5, 2018 15:52
-
-
Save ginkgomzd/a5d1baea48407df8a2446a4969ddc484 to your computer and use it in GitHub Desktop.
block websites so you can get shyte done
This file contains 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
#!/bin/sh | |
DOMAINS="www.facebook.com twitter.com www.instagram.com" | |
UNTIL=90 #minutes | |
for d in $DOMAINS | |
do | |
sudo iptables -I OUTPUT -d $d -j DROP | |
done | |
for d in $DOMAINS | |
do | |
echo "sudo iptables -D OUTPUT -d $d -j DROP;" | at now + $UNTIL min | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment