ipfilter (230099) | ipfilter (255450) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/ipfilter 230099 2012-01-14 02:18:41Z dougb $ | 3# $FreeBSD: head/etc/rc.d/ipfilter 255450 2013-09-10 13:48:33Z cy $ |
4# 5 6# PROVIDE: ipfilter 7# REQUIRE: FILESYSTEMS 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 --- 12 unchanged lines hidden (view full) --- 24status_precmd="$stop_precmd" 25status_cmd="ipfilter_status" 26extra_commands="reload resync" 27required_modules="ipl:ipfilter" 28 29ipfilter_start() 30{ 31 echo "Enabling ipfilter." | 4# 5 6# PROVIDE: ipfilter 7# REQUIRE: FILESYSTEMS 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 --- 12 unchanged lines hidden (view full) --- 24status_precmd="$stop_precmd" 25status_cmd="ipfilter_status" 26extra_commands="reload resync" 27required_modules="ipl:ipfilter" 28 29ipfilter_start() 30{ 31 echo "Enabling ipfilter." |
32 if [ `sysctl -n net.inet.ipf.fr_running` -le 0 ]; then | 32 if ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then |
33 ${ipfilter_program:-/sbin/ipf} -E 34 fi 35 ${ipfilter_program:-/sbin/ipf} -Fa 36 if [ -r "${ipfilter_rules}" ]; then 37 ${ipfilter_program:-/sbin/ipf} \ 38 -f "${ipfilter_rules}" ${ipfilter_flags} 39 fi | 33 ${ipfilter_program:-/sbin/ipf} -E 34 fi 35 ${ipfilter_program:-/sbin/ipf} -Fa 36 if [ -r "${ipfilter_rules}" ]; then 37 ${ipfilter_program:-/sbin/ipf} \ 38 -f "${ipfilter_rules}" ${ipfilter_flags} 39 fi |
40 ${ipfilter_program:-/sbin/ipf} -6 -Fa | |
41 if [ -r "${ipv6_ipfilter_rules}" ]; then 42 ${ipfilter_program:-/sbin/ipf} -6 \ 43 -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} 44 fi 45} 46 47ipfilter_stop() 48{ | 40 if [ -r "${ipv6_ipfilter_rules}" ]; then 41 ${ipfilter_program:-/sbin/ipf} -6 \ 42 -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} 43 fi 44} 45 46ipfilter_stop() 47{ |
49 # XXX - The ipf -D command is not effective for 'lkm's 50 if [ `sysctl -n net.inet.ipf.fr_running` -eq 1 ]; then | 48 if ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then |
51 echo "Saving firewall state tables" 52 ${ipfs_program:-/sbin/ipfs} -W ${ipfs_flags} 53 echo "Disabling ipfilter." 54 ${ipfilter_program:-/sbin/ipf} -D 55 fi 56} 57 58ipfilter_reload() --- 34 unchanged lines hidden --- | 49 echo "Saving firewall state tables" 50 ${ipfs_program:-/sbin/ipfs} -W ${ipfs_flags} 51 echo "Disabling ipfilter." 52 ${ipfilter_program:-/sbin/ipf} -D 53 fi 54} 55 56ipfilter_reload() --- 34 unchanged lines hidden --- |