ipfw (208060) | ipfw (220153) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/ipfw 208060 2010-05-14 04:53:57Z dougb $ | 3# $FreeBSD: head/etc/rc.d/ipfw 220153 2011-03-30 01:19:00Z emaste $ |
4# 5 6# PROVIDE: ipfw 7# REQUIRE: ppp 8# KEYWORD: nojail 9 10. /etc/rc.subr 11. /etc/network.subr --- 56 unchanged lines hidden (view full) --- 68 for _coscript in ${firewall_coscripts} ; do 69 if [ -f "${_coscript}" ]; then 70 ${_coscript} quietstart 71 fi 72 done 73 74 # Enable the firewall 75 # | 4# 5 6# PROVIDE: ipfw 7# REQUIRE: ppp 8# KEYWORD: nojail 9 10. /etc/rc.subr 11. /etc/network.subr --- 56 unchanged lines hidden (view full) --- 68 for _coscript in ${firewall_coscripts} ; do 69 if [ -f "${_coscript}" ]; then 70 ${_coscript} quietstart 71 fi 72 done 73 74 # Enable the firewall 75 # |
76 if ! ${SYSCTL_W} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then | 76 if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then |
77 warn "failed to enable IPv4 firewall" 78 fi 79 if afexists inet6; then | 77 warn "failed to enable IPv4 firewall" 78 fi 79 if afexists inet6; then |
80 if ! ${SYSCTL_W} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 | 80 if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 |
81 then 82 warn "failed to enable IPv6 firewall" 83 fi 84 fi 85} 86 87ipfw_stop() 88{ 89 local _coscript 90 91 # Disable the firewall 92 # | 81 then 82 warn "failed to enable IPv6 firewall" 83 fi 84 fi 85} 86 87ipfw_stop() 88{ 89 local _coscript 90 91 # Disable the firewall 92 # |
93 ${SYSCTL_W} net.inet.ip.fw.enable=0 | 93 ${SYSCTL} net.inet.ip.fw.enable=0 |
94 if afexists inet6; then | 94 if afexists inet6; then |
95 ${SYSCTL_W} net.inet6.ip6.fw.enable=0 | 95 ${SYSCTL} net.inet6.ip6.fw.enable=0 |
96 fi 97 98 # Stop firewall coscripts 99 # 100 for _coscript in `reverse_list ${firewall_coscripts}` ; do 101 if [ -f "${_coscript}" ]; then 102 ${_coscript} quietstop 103 fi 104 done 105} 106 107load_rc_config $name 108firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}" 109 110run_rc_command $* | 96 fi 97 98 # Stop firewall coscripts 99 # 100 for _coscript in `reverse_list ${firewall_coscripts}` ; do 101 if [ -f "${_coscript}" ]; then 102 ${_coscript} quietstop 103 fi 104 done 105} 106 107load_rc_config $name 108firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}" 109 110run_rc_command $* |