# -*-sh-*-
#
# template - use this file as a base for a new chain,
# which you can include into scipfire then.
#
# $Id: template,v 1.2 2001/07/29 21:23:35 scip Exp $



#
# The name of this chain
CHAIN=


#
# get the type of mode we are running under
# will be one of: start | startlog | print | stop
MODE=$1


#
# get the base path
PREFIX=$2


#
# source the config
. $PREFIX/conf/scipfire.cfg



#
# now $MODE is only start or stop!
case $MODE in
  "start")
    echo "  Initialize $CHAIN"
    #
    # initialize this chain
    $echo $iptables -N $CHAIN                # create the new chain
    $echo $iptables -F $CHAIN                # flush possibly existing rules(for restart|reload!)

    #
    # place the real rules for this particular chain
    #  example: $fw -p udp --dport 53 -j ACCEPT
    #
    # DROP/REJECT rules must be repeated with a logging rule
    #  example: $log  -p udp --dport 53   # note the missing -j param!

    
    ;;
  "stop")
    echo "  Deleting $CHAIN"
    #
    # zero and delete this chain
    $iptables -F $CHAIN
    $iptables -X $CHAIN
    ;;
esac
