Реклама: |
IP Filter rules are loaded by using the ipf utility. The filter rules can be
stored in any file on the system, but typically these rules are stored in /etc/ipf.rules,
/usr/local/etc/ipf.rules, or /etc/opt/ipf/ipf.rules.
IP Filter has two sets of rules, the active set and the inactive set. By
default, all operations are performed on the active set. You can manipulate the inactive
set by adding -I to the ipf command line. The two sets can be toggled by
using the -s command line option. This is very useful for testing new rule sets
without wiping out the old rule set.
Rules can also be removed from the list instead of added by using the -r
command line option, but it is generally a safer idea to flush the rule set that you're
working on with -F and completely reload it when making changes.
In summary, the easiest way to load a rule set is ipf -Fa -f /etc/ipf.rules.
For more complicated manipulations of the rule set, please see the ipf(1) man
page.