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 echo -n 'Starting divert daemons:'
39 if [ -f /etc/rc.d/natd ] ; then
42 . "${firewall_script}"
43 echo -n 'Firewall rules loaded'
44 elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then
45 echo 'Warning: kernel has firewall functionality, but' \
46 ' firewall rules are not enabled.'
47 echo ' All ip services are disabled.'
53 if checkyesno firewall_logging; then
54 echo 'Firewall logging enabled'
55 sysctl net.inet.ip.fw.verbose=1 >/dev/null
60 ${SYSCTL_W} net.inet.ip.fw.enable=1
65 # Disable the firewall
67 ${SYSCTL_W} net.inet.ip.fw.enable=0
68 if [ -f /etc/rc.d/natd ] ; then