#!/bin/bash function RULES() { iptables -P INPUT DROP iptables blah blah blah } function STOPP() { iptables -x iptables -f blah blah blah } case "$1" in start) RULES ;; stop) STOPP ;; *) echo "usage $0: start | stop) esac