3 # $FreeBSD: src/etc/rc.d/ip6fw,v 1.3 2003/06/29 05:15:57 mtm Exp $
13 rcvar
=`set_rcvar ipv6_firewall`
14 start_cmd
="ip6fw_start"
15 start_precmd
="ip6fw_prestart"
16 stop_cmd
="${SYSCTL_W} net.inet6.ip6.fw.enable=0"
20 # Load IPv6 firewall module, if not already loaded
21 if ! ${SYSCTL} net.inet6.ip6.fw.
enable > /dev
/null
2>&1; then
22 kldload
-n ip6fw ||
return 1
29 # Specify default rules file if none provided
30 if [ -z "${ipv6_firewall_script}" ]; then
31 ipv6_firewall_script
=/etc
/rc.firewall6
36 if [ -r "${ipv6_firewall_script}" ]; then
37 .
"${ipv6_firewall_script}"
38 echo 'IPv6 Firewall rules loaded.'
39 elif [ "`ip6fw l 65535`" = "65535 deny ipv6 from any to any" ]; then
40 warn
'IPv6 firewall rules have not been loaded. Default' \
41 ' to DENY all access.'
44 # Enable firewall logging
46 if checkyesno ipv6_firewall_logging
; then
47 echo 'IPv6 Firewall logging=YES'
48 sysctl net.inet6.ip6.fw.verbose
=1 >/dev
/null