Skip to content

Commit 89a8b6c

Browse files
committed
pve-firewall.adoc: small improvements
1 parent 39f4ffc commit 89a8b6c

File tree

1 file changed

+47
-23
lines changed

1 file changed

+47
-23
lines changed

pve-firewall.adoc

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,18 @@ ifndef::manvolnum[]
2525
include::attributes.txt[]
2626
endif::manvolnum[]
2727

28-
// Copied from pve wiki: Revision as of 08:45, 9 November 2015
29-
3028
Proxmox VE Firewall provides an easy way to protect your IT
31-
infrastructure. You can easily setup firewall rules for all hosts
29+
infrastructure. You can setup firewall rules for all hosts
3230
inside a cluster, or define rules for virtual machines and
3331
containers. Features like firewall macros, security groups, IP sets
34-
and aliases help making that task easier.
32+
and aliases helps to make that task easier.
3533

3634
While all configuration is stored on the cluster file system, the
3735
iptables based firewall runs on each cluster node, and thus provides
3836
full isolation between virtual machines. The distributed nature of
3937
this system also provides much higher bandwidth than a central
4038
firewall solution.
4139

42-
NOTE: If you enable the firewall, all traffic is blocked by default,
43-
except WebGUI(8006) and ssh(22) from your local network.
44-
4540
The firewall has full support for IPv4 and IPv6. IPv6 support is fully
4641
transparent, and we filter traffic for both protocols by default. So
4742
there is no need to maintain a different set of rules for IPv6.
@@ -70,16 +65,18 @@ Configuration Files
7065
All firewall related configuration is stored on the proxmox cluster
7166
file system. So those files are automatically distributed to all
7267
cluster nodes, and the 'pve-firewall' service updates the underlying
73-
iptables rules automatically on changes. Any configuration can be
74-
done using the GUI (i.e. Datacenter -> Firewall -> Options tab (tabs
75-
at the bottom of the page), or on a Node -> Firewall), so the
76-
following configuration file snippets are just for completeness.
68+
iptables rules automatically on changes.
7769

78-
All firewall configuration files contains sections of key-value
70+
You can configure anything using the GUI (i.e. Datacenter -> Firewall,
71+
or on a Node -> Firewall), or you can edit the configuration files
72+
directly using your preferred editor.
73+
74+
Firewall configuration files contains sections of key-value
7975
pairs. Lines beginning with a '#' and blank lines are considered
8076
comments. Sections starts with a header line containing the section
8177
name enclosed in '[' and ']'.
8278

79+
8380
Cluster Wide Setup
8481
~~~~~~~~~~~~~~~~~~
8582

@@ -95,15 +92,6 @@ This is used to set cluster wide firewall options.
9592

9693
include::pve-firewall-cluster-opts.adoc[]
9794

98-
NOTE: The firewall is completely disabled by default, so you need to
99-
set the enable option here:
100-
101-
----
102-
[OPTIONS]
103-
# enable firewall (cluster wide setting, default is disabled)
104-
enable: 1
105-
----
106-
10795
'[RULES]'::
10896

10997
This sections contains cluster wide firewall rules for all nodes.
@@ -120,6 +108,37 @@ Cluster wide security group definitions.
120108

121109
Cluster wide Alias definitions.
122110

111+
112+
Enabling the Firewall
113+
^^^^^^^^^^^^^^^^^^^^^
114+
115+
The firewall is completely disabled by default, so you need to
116+
set the enable option here:
117+
118+
----
119+
[OPTIONS]
120+
# enable firewall (cluster wide setting, default is disabled)
121+
enable: 1
122+
----
123+
124+
IMPORTANT: If you enable the firewall, traffic to all hosts is blocked by
125+
default. Only exceptions is WebGUI(8006) and ssh(22) from your local
126+
network.
127+
128+
If you want to administrate your {pve} hosts from remote, you
129+
need to create rules to allow traffic from those remote IPs to the web
130+
GUI (port 8006). You may also want to allow ssh (port 22), and maybe
131+
SPICE (port 3128).
132+
133+
TIP: Please open a SSH connection to one of your {PVE} hosts before
134+
enabling the firewall. That way you still have access to the host if
135+
something goes wrong .
136+
137+
To simplify that task, you can instead create an IPSet called
138+
'management', and add all remote IPs there. This creates all required
139+
firewall rules to access the GUI from remote.
140+
141+
123142
Host specific Configuration
124143
~~~~~~~~~~~~~~~~~~~~~~~~~~~
125144

@@ -173,8 +192,13 @@ IP Alias definitions.
173192
Enabling the Firewall for VMs and Containers
174193
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175194

176-
You need to enable the firewall on the virtual network interface configuration
177-
in addition to the general 'Enable Firewall' option in the 'Options' tab.
195+
Each virtual network device has its own firewall enable flag. So you
196+
can selectively enable the firewall for each interface. This is
197+
required in addition to the general firewall 'enable' option.
198+
199+
The firewall requires a special network device setup, so you need to
200+
restart the VM/container after enabling the firewall on a network
201+
interface.
178202

179203

180204
Firewall Rules

0 commit comments

Comments
 (0)