Skip to content

Instantly share code, notes, and snippets.

@ginkgomzd
Created September 5, 2018 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ginkgomzd/a5d1baea48407df8a2446a4969ddc484 to your computer and use it in GitHub Desktop.
Save ginkgomzd/a5d1baea48407df8a2446a4969ddc484 to your computer and use it in GitHub Desktop.
block websites so you can get shyte done
#!/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