1fwb_pf(1) Firewall Builder fwb_pf(1)
2
3
4
6 fwb_pf - Policy compiler for OpenBSD packet filter "pf"
7
9 fwb_pf [-vVx] [-d wdir] [-o output.fw] -f data_file.xml object_name
10
11
13 fwb_pf is a firewall policy compiler component of Firewall Builder (see
14 fwbuilder(1)). This compiler generates code for OpenBSD Packet Filter
15 (pf). Compiler reads objects definitions and firewall description from
16 the data file specified with "-f" option and generates pf configuration
17 files and firewall activation script.
18
19 All generated files have names that start with the name of the firewall
20 object. Firewall activation script has extension ".fw" and is simple
21 shell script that flushes current policy, loads new filter and nat
22 rules and then activates pf. PF configuration file name starts with
23 the name of the firewall object, plus "-pf.conf". NAT configuration
24 file name also starts with the name of the firewall object, plus
25 "-nat.conf". For example, if firewall object has name "myfirewall",
26 then compiler will create three files: "myfirewall.fw", "myfirewall-
27 pf.conf", "myfirewall-nat.conf".
28
29 The data file and the name of the firewall objects must be specified on
30 the command line. Other command line parameters are optional.
31
32
33
35 -f FILE
36 Specify the name of the data file to be processed.
37
38
39 -o output.fw
40 Specify output file name
41
42
43 -d wdir
44 Specify working directory. Compiler creates firewall acti‐
45 vation script and PF configuration files in this directory. If
46 this parameter is missing, then all files will be placed in the
47 current working directory.
48
49
50 -v Be verbose: compiler prints diagnostic messages when it works.
51
52
53 -V Print version number and quit.
54
55
56 -x Generate debugging information while working. This option is
57 intended for debugging only and may produce lots of cryptic mes‐
58 sages.
59
60
62 Support for PF has been introduced in version 1.0.1 of Firewall Builder
63
64
65 Supported features:
66
67
68 o both pf.conf and nat.conf files are generated
69
70
71 o negation in policy and NAT rules
72
73
74 o grouping in "from", "to" and ports using '{' '}' syntax
75
76
77 o if checkbox "Scrub" is checked in the rule options dialog, and
78 rule's action is Accept, the compiler generates two (almost)
79 identical rules: first with action 'scrub' and the second with
80 action 'pass quick'
81
82
83 o stateful inspection in individual rule can be turned off in rule
84 options dialog. By default compiler adds "keep state" or "modu‐
85 late state" to each rule with action 'pass'
86
87
88 o rule options dialog provides a choice of icmp or tcp rst replies
89 for rules with action "Reject"
90
91
92 o compiler adds flag "allow-opts" if match on ip options is needed
93
94
95 o compiler can generate rules matching on TCP flags
96
97
98 o compiler can generate script adding ip aliases for NAT rules
99 using addresses that do not belong to any interface of the fire‐
100 wall
101
102
103 o compiler always adds rule "block quick all" at the very bottom
104 of the script to ensure "block all by default" policy even if
105 the policy is empty.
106
107
108 o Address ranges in both policy and NAT
109
110
111
112 Features that are not supported (yet)
113
114
115 o custom services
116
117
118
119 What will not be supported (at least not anytime soon)
120
121
122 o policy routing
123
124
126 Firewall Builder home page is located at the following URL:
127 http://www.fwbuilder.org/
128
129
131 Please report bugs using bug tracking system on SourceForge:
132
133 http://sourceforge.net/tracker/?group_id=5314&atid=105314
134
135
136
138 fwbuilder(1), fwb_ipt(1), fwb_ipf(1)
139
140
141FWB fwb_pf(1)