3 # $FreeBSD: src/etc/rc.d/ip6fw,v 1.3 2003/06/29 05:15:57 mtm Exp $
4 # $DragonFly: src/etc/rc.d/ip6fw,v 1.3 2005/11/19 22:47:32 swildner Exp $
14 rcvar
=`set_rcvar ipv6_firewall`
15 start_cmd
="ip6fw_start"
16 start_precmd
="ip6fw_prestart"
17 stop_cmd
="${SYSCTL_W} net.inet6.ip6.fw.enable=0"
21 # Load IPv6 firewall module, if not already loaded
22 if ! ${SYSCTL} net.inet6.ip6.fw.
enable > /dev
/null
2>&1; then
24 debug
'Kernel IPv6 firewall module loaded.'
27 warn
'IPv6 firewall kernel module failed to load.'
34 # Specify default rules file if none provided
35 if [ -z "${ipv6_firewall_script}" ]; then
36 ipv6_firewall_script
=/etc
/rc.firewall6
41 if [ -r "${ipv6_firewall_script}" ]; then
42 .
"${ipv6_firewall_script}"
43 echo 'IPv6 Firewall rules loaded.'
44 elif [ "`ip6fw l 65535`" = "65535 deny ipv6 from any to any" ]; then
45 warn
'IPv6 firewall rules have not been loaded. Default' \
46 ' to DENY all access.'
49 # Enable firewall logging
51 if checkyesno ipv6_firewall_logging
; then
52 echo 'IPv6 Firewall logging=YES'
53 sysctl net.inet6.ip6.fw.verbose
=1 >/dev
/null