Debian Codegraph @

src/res/help/en_US/pf_rule_options.html

raw
1 <h2>Rule options for PF policy rules</h2>
2
3 <a name="general"/>
4 <h2>Tab General</h2>
5
6 <h3>Stateless rule</h3>
7
8 <p>
9 Firewall Builder always uses stateful packet inspection if it is
10 available in the target firewall. In case of PF, this means using
11 "keep state" option for PF 3.x. In PF 4.x, combination "flags S/SA
12 keep state" is the default so fwbuilder does not add it explicitly
13 to the generated pf configuration. However, sometimes it might be
14 desirable to create a rule without state matching. Checking this
15 checkbox on makes the rule stateless and forces compiler to add
16 "no state" clause to the generated pf configuration line.
17 </p>
18
19 <h3>Add 'keep state'</h3>
20
21 <p>
22 In PF 4.x, "flags S/SA keep state" is the default. Compiler will omit
23 these flags while generating code for stateful rules matching TCP
24 services. However, according to the PF FAQ, care should be taken while
25 dealing with states and interface enc0. To avoid leaking unencrypted
26 traffic out, the FAQ recommends setting 'keep state' explicitly in all
27 rules on the enc0 interface. This option applies only if version is
28 set to 4.x.
29 </p>
30
31 <a name="logging"/>
32 <hr/>
33 <h2>Tab Logging</h2>
34
35 <h3>Log prefix</h3>
36
37 <p>
38 This option translates into "label " in the generated pf
39 configuration. Firewall Builder supports the following macros in
40 the log prefix that are expanded at the compile time:
41 </p>
42
43 <p>
44 <ul>
45 <li>%N rule number in the GUI. </li>
46 <li>%A rule action </li>
47 <li>%I interface the rule is associated with </li>
48 <li>%C (iptables only) iptables chain that this rule generated
49 code for. </li>
50 </ul>
51 </p>
52
53 <a name="tracking"/>
54 <hr>
55 <h2>Tab Tracking</h2>
56
57 <h3>Activate source tracking</h3>
58
59 <p>
60 This checkbox enables using <b>max-src-nodes</b>
61 and <b>max-src-states</b> options that can be configured using other
62 elements in this page of the dialog.
63 </p>
64
65 <h3>Maximum number of source addresses...</h3>
66
67 <p>
68 This option translates into <b>max-src-nodes</b> parameter. It
69 limits the maximum number of source addresses which can
70 simultaneously have state table entries.
71 </p>
72
73
74 <h3>Maximum number of simultaneous state entries...</h3>
75
76 <p>
77 This option translates into <b>max-src-states</b> parameter. It
78 limits the maximum number of simultaneous state entries that a
79 single source address can create with this rule.
80 </p>
81
82
83
84 <a name="limits"/>
85 <hr>
86 <h2>Tab Limits</h2>
87
88 <h3>Maximum number of concurrent states...</h3>
89
90
91 <p>
92 This parameter translates into "max &lt;number&gt;". It limits the
93 number of concurrent states the rule may create. When this limit is
94 reached, further packets that would create state will not match this
95 rule until existing states time out.
96 </p>
97
98
99 <h3>Maximum number of simultaneous TCP connections...</h3>
100
101 <p>
102 This parameter translates into "max-src-conn &lt;number&gt;". It
103 limits the maximum number of simultaneous TCP connections which have
104 completed the 3-way handshake that a single host can make.
105 </p>
106
107
108 <h3>The limit of new connections over a time interval ... / ... sec</h3>
109
110 <p>
111 These parameters translate into "max-src-conn-rate &lt;number&gt; /
112 &lt;seconds&gt;". They limit the rate of new connections over a time
113 interval. The connection rate is an approximation calculated as a
114 moving average.
115 </p>
116
117
118 <h3>Overload table</h3>
119
120 <p>
121 this parameter translates into "overload" in the generated pf
122 configuration and can be used to create a table with given name.
123 Source IP addresses which hit either of the limits on established
124 connections will be added to the named table. This table can be
125 used in the ruleset to block further activity from the offending
126 host, redirect it to a tarpit process, or restrict its bandwidth.
127 </p>
128
129 <p>
130 To use this table in the rules, create Address Table object with the
131 same name and leave the file name in that object blank. Then use
132 this object in policy rules of the firewall as usual.
133 </p>
134
135
136 <a name="tcp"/>
137 <hr>
138 <h2>Tab TCP</h2>
139
140 <h3>Modulate state</h3>
141
142 <p>
143 When this checkbox is checked, it makes compiler add "modulate
144 state" clause to generated pf configuration.
145 </p>
146
147 <p>
148 This option makes pf randomize TCP initial sequence numbers (ISN) of
149 the TCP sessions opened through the firewall, thus improving
150 protection against ISN guessing attacks. See man page for pf.conf
151 for more details.
152 </p>
153
154
155 <h3>synproxy</h3>
156
157 <p>
158 This parameter translates to the "synproxy" option in generated pf
159 configuration. The synproxy state option can be used to cause pf
160 itself to complete the handshake with the active endpoint, perform a
161 handshake with the passive endpoint, and then forward packets
162 between the endpoints. See man page for pf.conf for more details.
163 </p>
164
165
166 <h3>Use sloppy TCP state tracker for this rule</h3>
167
168 <p>
169 This parameter translates into "sloppy" parameter in generated pf
170 configuration. From pf.conf man page:
171 <blockquote>
172 This makes pf use sloppy TCP connection tracker that
173 does not check sequence numbers at all, which makes insertion and
174 ICMP teardown attacks way easier. This is intended to be used in
175 situations where one does not see all packets of a connection,
176 e.g. in asymmetric routing situations. Cannot be used with modulate
177 or synproxy state.
178 </blockquote>
179 </p>