Skip to content

Instantly share code, notes, and snippets.

@tylerflint
Created December 9, 2011 23:46
Show Gist options
  • Save tylerflint/1453869 to your computer and use it in GitHub Desktop.
Save tylerflint/1453869 to your computer and use it in GitHub Desktop.
iptables default policy load
#! /bin/sh
### BEGIN INIT INFO
# Provides: iptables
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: iptables
# Description: loads iptables default policy
### END INIT INFO
case "$1" in
start)
echo -n "Loading iptables default policy: "
/sbin/iptables-restore < /etc/default/iptables
echo "done."
;;
*)
echo "Usage: service $name {start}" >&2
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment