isting 3. Script for Starting the Firewall
#!/bin/bash
#
# bridge      This shell script takes care of installing bridging for dsl
#
# description: Uses brcfg to start bridging and ifconfigs eths
# processname: bridge
# config:

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# See how we were called.
case "$1" in
  start)
	echo -n "Configuring firewall rules:"
	/etc/firewall
	echo
        echo -n "Configuring bridge: "
        ifconfig eth1 promisc up
        ifconfig eth2 promisc up
        brcfg start
	brcfg device eth1 enable
	brcfg device eth2 enable
        echo
	echo "Starting Snort: "
	/usr/local/bin/snort -c /usr/local/etc/snort/snort-lib -s -i eth2 -D
	echo
        ;;
  stop)
        # Stop daemons.
        brcfg stop
	ifconfig eth1 -promisc down
	ifconfig eth2 -promisc down
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  status)
        brcfg
        ;;
  *)
        echo "Usage: bridge {start|stop|restart|status}"
        exit 1
esac

exit 0