Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 20 lines (17 sloc) 0.37 kB
#!/bin/sh
case $1 in
open)
echo "Opening port $2"
sudo iptables -A INPUT -p tcp --dport $2 -j ACCEPT
;;
close)
echo "Closing port $2"
sudo iptables -A INPUT -p tcp --dport $2 -j DROP
;;
openall)
echo "Delete all Rules"
sudo iptables -F
;;
*)
echo "port.sh open <portnumber> \nport.sh close <portnumber> \nport.sh openall"
esac
Jump to Line
Something went wrong with that request. Please try again.