The Datacenter firewall setting is the master switch in Proxmox VE. If it’s off, rules configured for nodes and guests have no effect. With Datacenter enabled, check the node’s firewall setting for host traffic, or the guest setting and its network device for guest traffic. Set up management access before turning on the Datacenter switch.
Where host.fw lives: /etc/pve/nodes/<nodename>/host.fw
Proxmox reads node-specific rules and options from /etc/pve/nodes/<nodename>/host.fw. The Datacenter file cluster.fw and each guest’s <VMID>.fw live in /etc/pve/firewall/. The Proxmox cluster filesystem distributes both directories to the nodes. Proxmox firewall chapter
Why your rules appear to do nothing
The Datacenter warning means the cluster-wide switch is off. Proxmox lets you configure rules at lower levels while that switch is off. Record the current settings so you can restore them, then use this checklist to find the switch for your traffic.
| Scope | Configuration | What to check |
|---|---|---|
| Datacenter | /etc/pve/firewall/cluster.fw | [OPTIONS] → enable: 1. The default is off. In the GUI, set Firewall in Datacenter → Firewall → Options after preparing management access. |
| Node | /etc/pve/nodes/<nodename>/host.fw | [OPTIONS] → enable: 1. The default is on. This gates firewalling for the host zone on that node. |
| VM or container | /etc/pve/firewall/<VMID>.fw | [OPTIONS] → enable: 1. The default is off. |
| Guest network device | /etc/pve/qemu-server/<VMID>.conf for a VM or /etc/pve/lxc/<CTID>.conf for a container | Check for firewall=1 on the interface receiving the traffic, such as net0. This flag and the guest-level switch are both required. |
The node and guest switches control separate traffic scopes. Rules at node level take precedence over Datacenter rules for that host. Proxmox firewall chapter, Datacenter navigation, Firewall Options implementation, VM config location, VM network settings, container config location, container network settings
Check direction next. Rules for traffic to the node go in the host zone, and rules for traffic to a guest go in that guest’s inbound rules. The classic pve-firewall backend ignores FORWARD and SDN VNet rules. Proxmox firewall chapter
Safe defaults: enabling without locking yourself out
- Open an SSH session to the node and keep it open. Arrange console access in case the session drops. The default input policy is
DROP, with exceptions for established connections and some management and cluster traffic. - Add your trusted admin source addresses to the
managementIPSet in/etc/pve/firewall/cluster.fw. Merge entries into the existing block if it already exists. The example adds one admin machine to the built-in host management exceptions. Substitute your admin machine’s source address. - On a classic-backend node, run the
pve-firewall localnetcommand below before enabling. Check the effectivelocal_networkvalue against the network you intend for cluster traffic. Proxmox also adds the local cluster network tomanagementautomatically. - Once management access is prepared, set
enable: 1in the existing[OPTIONS]block incluster.fwif needed. Verify a new connection tohttps://<node-ip>:8006and a new SSH connection from an allowed admin machine before closing your original session.
# /etc/pve/firewall/cluster.fw
[IPSET management]
192.168.2.10
pve-firewall localnet
local_network is an automatically detected alias used in cluster communication rules. On a standalone node on a public network, Proxmox recommends setting the alias to the node’s own IP. Put it in the [ALIASES] block in cluster.fw, then rerun pve-firewall localnet on the classic backend to check the effective value.
# /etc/pve/firewall/cluster.fw
[ALIASES]
local_network 192.168.2.100
Replace the example address with the actual node IP. Keep all cluster peers covered if you change the alias on a cluster. The Proxmox firewall chapter documents both the automatic exceptions and the explicit alias. See the Proxmox ports reference for the full service inventory.
Which management ports stay open?
The host’s built-in exceptions include TCP 8006 for the HTTPS web interface and API, TCP 22 for SSH, TCP 5900–5999 for the VNC console, and TCP 3128 for SPICE from management sources. Custom host services need their own rules if the input policy drops them. Proxmox firewall chapter, Proxmox pveproxy documentation
Verify the loaded rules
Run the checks from a root shell on the node that owns the host rule or runs the guest. Check nftables in the node’s host.fw to identify the intended backend, then use its status command and inspect the live rules. Proxmox firewall chapter
Classic iptables backend
pve-firewall status
iptables-save
pve-firewall status compiles the configuration and reports warnings. Read those warnings first if a rule is missing. Use pve-firewall compile to print the compiled rules and iptables-save to check what is loaded for IPv4. Proxmox pve-firewall command reference, Proxmox firewall chapter
For a classic-backend check of compiled rules for HTTPS management traffic, use the simulator below. It assumes a routable path and defaults to TCP from the outside to the host. Proxmox pve-firewall command reference
pve-firewall simulate --source 192.168.2.10 --dport 8006
nftables backend
systemctl status proxmox-firewall
nft list ruleset
An active service is only the first check. Look for the relevant rules in the proxmox-firewall table for host traffic or proxmox-firewall-guests for guest traffic. If rules are missing, read the service status messages and recheck the Datacenter switch and the settings for the rule’s scope. Proxmox firewall chapter
Worked check: restrict HTTP on one guest
Pick a VM or container already serving HTTP. From two clients, first confirm both can reach its IPv4 address. This example uses 192.168.2.100 for the guest, 192.168.2.10 for the allowed client and 192.168.2.20 for the denied client. Use the client source addresses seen by the firewall.
In /etc/pve/firewall/<VMID>.fw, add the two lines to [RULES] in this order, ahead of any existing rule that would match this traffic. If the guest firewall was off, prepare any other rules the guest needs under its input policy before turning it on. The host’s management exceptions apply only to hosts. Proxmox firewall chapter, firewall rule options, VM and container comparison
[RULES]
IN ACCEPT -p tcp -dport 80 -source 192.168.2.10
IN DROP -p tcp -dport 80
With Datacenter enabled, enable the guest firewall and set firewall=1 on the guest NIC carrying the HTTP traffic. Repeat the backend checks above and look for the source-specific accept followed by the drop for TCP 80 in the guest’s rules. Then run the same command from both clients. The command connects directly and exits after ten seconds if the request is still pending. curl command-line manual
curl --noproxy '*' --max-time 10 http://192.168.2.100/
| Client source | Expected result after applying the rules |
|---|---|
192.168.2.10 | The guest responds over HTTP. |
192.168.2.20 | The new connection times out under the DROP rule. |
If both clients still connect, recheck the guest and NIC switches, rule order and the source address. If both fail, check that the allow rule is loaded and that the allowed client can still reach the service after undoing the change.
Undo this example. Remove the two added lines from that guest’s [RULES] block, or prefix each with | to disable it. Restore the guest and NIC settings if you changed them, then repeat the ruleset and connection checks. Proxmox firewall chapter
Opening a port range and reusing rules
The destination port uses a colon for an interval, such as 8000:8010. For a list, separate ports or intervals with commas. The example permits a range on a node for sources in the Datacenter management set. Proxmox firewall chapter, firewall rule options
[RULES]
IN ACCEPT -p tcp -dport 8000:8010 -source +management
For rules shared between guests, define a group in cluster.fw and reference it in each guest’s [RULES] block. For example, GROUP webserver includes the rules from [group webserver]. Edits to that group apply to all guests that use it. Proxmox firewall chapter
Logging a rule
Set an inbound or outbound log level under Firewall → Options for the node or guest and read the entries under Firewall → Log. For one rule, append -log info to that rule. Standard rules log only some drops and rejects, so a quiet log is inconclusive. Proxmox firewall chapter
How to disable the Proxmox firewall
Restore the previous value at the smallest scope that matches the change. A disabled Datacenter firewall removes filtering across the cluster.
| Change to undo | Setting to restore |
|---|---|
| One rule | Remove the added line or disable it as shown in the worked example. |
| Firewall on one guest NIC | Set firewall=0 on that guest’s netN entry. |
| Firewall for one guest | Set enable: 0 in [OPTIONS] in that guest’s <VMID>.fw. |
| Host firewall on one node | Set enable: 0 in [OPTIONS] in that node’s host.fw. Guest settings are separate. |
| Datacenter switch | Set enable: 0 in [OPTIONS] in cluster.fw if the switch was off before your change. |
If you’re locked out, use the console to undo the setting. As an emergency fallback on that node, pve-firewall stop removes the classic backend’s generated rules. On nftables, systemctl stop proxmox-firewall removes that backend’s generated rules. Either stop can leave traffic unfiltered. Restore the configuration before starting the service again. Proxmox firewall chapter, pve-firewall command reference
The nftables backend
proxmox-firewall uses the same configuration files as the classic backend and adds support for FORWARD and SDN VNet rules. Earlier documentation called it a technology preview. The Proxmox VE 9.2 documentation changelog records removal of that warning in the pve-docs 9.2.16 entry. Proxmox firewall chapter, Proxmox documentation changelog
If the package is missing, run apt install proxmox-firewall. Then set nftables: 1 under [OPTIONS] in the node’s host.fw. Use nftables: 0 to return to the classic backend. Restart all running VMs and containers on that node after either change, then check the newly selected backend’s loaded rules. Schedule the restarts before changing the setting. Proxmox firewall chapter
On nftables, guest REJECT rules drop traffic, and guest rules are evaluated even for connections with connection-tracking entries. On Linux bridges, the nftables backend omits the extra fwbrX firewall bridges. The bridge and VLAN guide covers the bridge configuration itself. Proxmox firewall chapter
Related across the network
- OPNsense Port Forwarding: NAT Rules That Actually Work — opnsenselab.com
- Proxmox No Quorum Errors: Corosync Troubleshooting — proxmoxlab.org
FAQ
How do I restrict the Proxmox admin port at the proxy?
pveproxy has its own IP access list in /etc/default/pveproxy. For an allowlist, set ALLOW_FROM to the trusted ranges, DENY_FROM="all" and POLICY="allow". Account for any cluster peers that need API access before editing the proxy settings. Proxmox pveproxy documentation
What does NDP do in the Proxmox firewall?
The NDP option allows IPv6 Neighbor Discovery traffic. It is enabled by default for hosts and guests. Proxmox firewall chapter
Can I add my own iptables rules on a Proxmox host?
Put Proxmox-managed rules in the .fw files so the firewall service regenerates them from your configuration. With the nftables backend, you can put custom nftables rules in a separate table because proxmox-firewall manages only its own tables. Proxmox firewall chapter
Evidence and limits. This guide is based on Proxmox VE 9.2 documentation. The steps and worked example were not run on a Proxmox host for this guide.