ProxmoxGuide
Flat isometric illustration of a dark server rack marked with a padlock badge, standing inside a glowing square perimeter with four lit corner posts on a grid platform
security

Proxmox Firewall Not Working? Enable Chain and host.fw

Fix Proxmox firewall rules that have no effect. Check datacenter, node, guest and NIC settings, verify rules, and keep management access.

By ProxmoxGuide Editorial · ·Updated · 8 min read

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.

ScopeConfigurationWhat 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 containerCheck 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

  1. 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.
  2. Add your trusted admin source addresses to the management IPSet 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.
  3. On a classic-backend node, run the pve-firewall localnet command below before enabling. Check the effective local_network value against the network you intend for cluster traffic. Proxmox also adds the local cluster network to management automatically.
  4. Once management access is prepared, set enable: 1 in the existing [OPTIONS] block in cluster.fw if needed. Verify a new connection to https://<node-ip>:8006 and 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 sourceExpected result after applying the rules
192.168.2.10The guest responds over HTTP.
192.168.2.20The 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 undoSetting to restore
One ruleRemove the added line or disable it as shown in the worked example.
Firewall on one guest NICSet firewall=0 on that guest’s netN entry.
Firewall for one guestSet enable: 0 in [OPTIONS] in that guest’s <VMID>.fw.
Host firewall on one nodeSet enable: 0 in [OPTIONS] in that node’s host.fw. Guest settings are separate.
Datacenter switchSet 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

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.

Sources

  1. Proxmox VE Administration Guide source: Firewall
  2. Proxmox VE web interface: Firewall Options
  3. Proxmox VE Datacenter firewall navigation
  4. Proxmox VE QEMU/KVM VM documentation
  5. Proxmox VE container documentation
  6. Proxmox VE VM configuration options
  7. Proxmox VE container configuration options
  8. Proxmox VE firewall rule options
  9. Proxmox VE pve-firewall command reference
  10. curl command-line manual
  11. Proxmox VE documentation package changelog
  12. Proxmox VE pveproxy documentation source

Related