ipfw (127897) | ipfw (128714) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/ipfw 127897 2004-04-05 16:29:45Z fjoe $ | 3# $FreeBSD: head/etc/rc.d/ipfw 128714 2004-04-28 13:20:15Z phk $ |
4# 5 6# PROVIDE: ipfw 7# REQUIRE: ppp-user 8# BEFORE: NETWORKING 9# KEYWORD: FreeBSD nojail 10 11. /etc/rc.subr --- 20 unchanged lines hidden (view full) --- 32ipfw_start() 33{ 34 # set the firewall rules script if none was specified 35 [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall 36 37 if [ -r "${firewall_script}" ]; then 38 . "${firewall_script}" 39 echo -n 'Firewall rules loaded, starting divert daemons:' | 4# 5 6# PROVIDE: ipfw 7# REQUIRE: ppp-user 8# BEFORE: NETWORKING 9# KEYWORD: FreeBSD nojail 10 11. /etc/rc.subr --- 20 unchanged lines hidden (view full) --- 32ipfw_start() 33{ 34 # set the firewall rules script if none was specified 35 [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall 36 37 if [ -r "${firewall_script}" ]; then 38 . "${firewall_script}" 39 echo -n 'Firewall rules loaded, starting divert daemons:' |
40 /etc/rc.d/natd start | 40 if [ -f /etc/rc.d/natd ] ; then 41 /etc/rc.d/natd start 42 fi |
41 elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then 42 echo 'Warning: kernel has firewall functionality, but' \ 43 ' firewall rules are not enabled.' 44 echo ' All ip services are disabled.' 45 fi 46 echo '.' 47 48 # Firewall logging --- 8 unchanged lines hidden (view full) --- 57 ${SYSCTL_W} net.inet.ip.fw.enable=1 58} 59 60ipfw_stop() 61{ 62 # Disable the firewall 63 # 64 ${SYSCTL_W} net.inet.ip.fw.enable=0 | 43 elif [ "`ipfw l 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.' 47 fi 48 echo '.' 49 50 # Firewall logging --- 8 unchanged lines hidden (view full) --- 59 ${SYSCTL_W} net.inet.ip.fw.enable=1 60} 61 62ipfw_stop() 63{ 64 # Disable the firewall 65 # 66 ${SYSCTL_W} net.inet.ip.fw.enable=0 |
65 /etc/rc.d/natd stop | 67 if [ -f /etc/rc.d/natd ] ; then 68 /etc/rc.d/natd stop 69 fi |
66} 67 68load_rc_config $name 69run_rc_command "$1" | 70} 71 72load_rc_config $name 73run_rc_command "$1" |