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.2 2004/01/26 17:21:15 rob Exp $
15 rcvar=`set_rcvar ipv6_firewall`
16 start_cmd="ip6fw_start"
17 start_precmd="ip6fw_prestart"
18 stop_cmd="${SYSCTL_W} net.inet6.ip6.fw.enable=0"
22 # Load IPv6 firewall module, if not already loaded
23 if ! ${SYSCTL} net.inet6.ip6.fw.enable > /dev/null 2>&1; then
25 debug 'Kernel IPv6 firewall module loaded.'
28 warn 'IPv6 firewall kernel module failed to load.'
35 # Specify default rules file if none provided
36 if [ -z "${ipv6_firewall_script}" ]; then
37 ipv6_firewall_script=/etc/rc.firewall6
42 if [ -r "${ipv6_firewall_script}" ]; then
43 . "${ipv6_firewall_script}"
44 echo 'IPv6 Firewall rules loaded.'
45 elif [ "`ip6fw l 65535`" = "65535 deny ipv6 from any to any" ]; then
46 warn 'IPv6 firewall rules have not been loaded. Default' \
47 ' to DENY all access.'
50 # Enable firewall logging
52 if checkyesno ipv6_firewall_logging; then
53 echo 'IPv6 Firewall logging=YES'
54 sysctl net.inet6.ip6.fw.verbose=1 >/dev/null