7 # REQUIRE: FILESYSTEMS netif pflog pfsync
19 reload_cmd="pf_reload"
20 resync_cmd="pf_resync"
21 status_cmd="pf_status"
22 extra_commands="check reload resync"
23 required_files="$pf_rules"
28 check_startmsgs && echo -n 'Enabling pf'
29 $pf_program -F all > /dev/null 2>&1
30 $pf_program -f "$pf_rules" $pf_flags
31 if ! $pf_program -s info | grep -q "Enabled" ; then
34 check_startmsgs && echo '.'
39 if $pf_program -s info | grep -q "Enabled" ; then
40 echo -n 'Disabling pf'
48 echo "Checking pf rules."
49 $pf_program -n -f "$pf_rules"
54 echo "Reloading pf rules."
55 $pf_program -n -f "$pf_rules" || return 1
56 # Flush everything but existing state entries that way when
57 # rules are read in, it doesn't break established connections.
58 $pf_program -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp > /dev/null 2>&1
59 $pf_program -f "$pf_rules" $pf_flags
64 $pf_program -f "$pf_rules" $pf_flags