15 rcvar="firewall_enable"
16 start_cmd="ipfw_start"
17 start_precmd="ipfw_precmd"
22 if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1; then
23 if ! kldload ipfw; then
24 warn unable to load firewall module.
34 # set the firewall rules script if none was specified
35 [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall
37 if [ -r "${firewall_script}" ]; then
38 if [ -f /etc/rc.d/natd ] ; then
41 . "${firewall_script}"
42 echo 'Firewall rules loaded.'
43 elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then
44 echo 'Warning: kernel has firewall functionality, but' \
45 ' firewall rules are not enabled.'
46 echo ' All ip services are disabled.'
51 if checkyesno firewall_logging; then
52 echo 'Firewall logging enabled.'
53 sysctl net.inet.ip.fw.verbose=1 >/dev/null
58 ${SYSCTL_W} net.inet.ip.fw.enable=1
63 # Disable the firewall
65 ${SYSCTL_W} net.inet.ip.fw.enable=0
66 if [ -f /etc/rc.d/natd ] ; then