@@ -45,21 +45,68 @@ transparent, and we filter traffic for both protocols by default. So
45
45
there is no need to maintain a different set of rules for IPv6.
46
46
47
47
48
+ Directions & Zones
49
+ ------------------
50
+
51
+ The Proxmox VE firewall groups the network into multiple logical zones. You can
52
+ define rules for each zone independently. Depending on the zone, you can define
53
+ rules for incoming, outgoing or forwarded traffic.
54
+
55
+
56
+ Directions
57
+ ~~~~~~~~~~
58
+
59
+ There are 3 directions that you can choose from when defining rules for a zone:
60
+
61
+ In::
62
+
63
+ Traffic that is arriving in a zone.
64
+
65
+ Out::
66
+
67
+ Traffic that is leaving a zone.
68
+
69
+ Forward::
70
+
71
+ Traffic that is passing through a zone. In the host zone this can be routed
72
+ traffic (when the host is acting as a gateway or performing NAT). At a
73
+ VNet-level this affects all traffic that is passing by a VNet, including
74
+ traffic from/to bridged network interfaces.
75
+
76
+
77
+ IMPORTANT: Creating rules for forwarded traffic is currently only possible when
78
+ using the new xref:pve_firewall_nft[nftables-based proxmox-firewall]. Any
79
+ forward rules will be ignored by the stock `pve-firewall` and have no effect!
80
+
81
+
48
82
Zones
49
- -----
83
+ ~~~~~
50
84
51
- The Proxmox VE firewall groups the network into the following logical zones :
85
+ There are 3 different zones that you can define firewall rules for :
52
86
53
87
Host::
54
88
55
- Traffic from/to a cluster node
89
+ Traffic going from/to a host, or traffic that is forwarded by a host.
90
+ You can define rules for this zone either at the datacenter level or at the host
91
+ level. Rules at host level take precedence over rules at datacenter level.
56
92
57
93
VM::
58
94
59
- Traffic from/to a specific VM
95
+ Traffic going from/to a VM or CT.
96
+ You cannot define rules for forwarded traffic, only for incoming / outgoing
97
+ traffic.
98
+
99
+ VNet::
100
+
101
+ Traffic passing through a SDN VNet, either from guest to guest or from host to
102
+ guest and vice-versa.
103
+ Since this traffic is always forwarded traffic, it is only possible to create
104
+ rules with direction forward.
60
105
61
- For each zone, you can define firewall rules for incoming and/or
62
- outgoing traffic.
106
+
107
+ IMPORTANT: Creating rules on a VNet-level is currently only possible when using
108
+ the new xref:pve_firewall_nft[nftables-based proxmox-firewall]. Any VNet-level
109
+ rules will be ignored by the stock `pve-firewall` and have no effect!
63
110
64
111
65
112
Configuration Files
@@ -202,10 +249,46 @@ can selectively enable the firewall for each interface. This is
202
249
required in addition to the general firewall `enable` option.
203
250
204
251
252
+ [[pve_firewall_vnet_configuration]]
253
+ VNet Configuration
254
+ ~~~~~~~~~~~~~~~~~~
255
+ VNet related configuration is read from:
256
+
257
+ /etc/pve/sdn/firewall/<vnet_name>.fw
258
+
259
+ This can be used for setting firewall configuration globally on a VNet level,
260
+ without having to set firewall rules for each VM inside the VNet separately. It
261
+ can only contain rules for the `FORWARD` direction, since there is no notion of
262
+ incoming or outgoing traffic. This affects all traffic travelling from one
263
+ bridge port to another, including the host interface.
264
+
265
+ WARNING: This feature is currently only available for the new
266
+ xref:pve_firewall_nft[nftables-based proxmox-firewall]
267
+
268
+ Since traffic passing the `FORWARD` chain is bi-directional, you need to create
269
+ rules for both directions if you want traffic to pass both ways. For instance if
270
+ HTTP traffic for a specific host should be allowed, you would need to create the
271
+ following rules:
272
+
273
+ ----
274
+ FORWARD ACCEPT -dest 10.0.0.1 -dport 80
275
+ FORWARD ACCEPT -source 10.0.0.1 -sport 80
276
+ ----
277
+
278
+ `[OPTIONS]`::
279
+
280
+ This is used to set VNet related firewall options.
281
+
282
+ include::pve-firewall-vnet-opts.adoc[]
283
+
284
+ `[RULES]`::
285
+
286
+ This section contains VNet specific firewall rules.
287
+
205
288
Firewall Rules
206
289
--------------
207
290
208
- Firewall rules consists of a direction (`IN` or `OUT `) and an
291
+ Firewall rules consists of a direction (`IN`, `OUT` or `FORWARD `) and an
209
292
action (`ACCEPT`, `DENY`, `REJECT`). You can also specify a macro
210
293
name. Macros contain predefined sets of rules and options. Rules can be
211
294
disabled by prefixing them with `|`.
@@ -639,6 +722,7 @@ Ports used by {pve}
639
722
* live migration (VM memory and local-disk data): 60000-60050 (TCP)
640
723
641
724
725
+ [[pve_firewall_nft]]
642
726
nftables
643
727
--------
644
728
0 commit comments