Created
February 9, 2014 11:28
-
-
Save jsvennevid/8897834 to your computer and use it in GitHub Desktop.
Simple script to turn on/off firewall on Chromebooks
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 | |
case "$1" in | |
on) /sbin/iptables -P INPUT DROP | |
echo "Firewall has been turned on, incoming connections are no longer accepted." | |
shift;; | |
off) /sbin/iptables -P INPUT ACCEPT | |
echo "Firewall has been turned off, incoming connections are now accepted." | |
shift;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment