Linux VPS

Set up the Proxmox VE firewall for the host and VMs

Enable the built-in Proxmox firewall safely: allow the web UI and SSH first, then add datacenter, node and per-VM rules, security groups and IP sets.

IntermediateProxmox VE2 min read

Proxmox VE ships with a firewall managed from the web UI. It works at three levels (datacenter, node and VM/container), and the Proxmox firewall setup order matters: add allow rules first, enable the firewall second.

Before you start

  • Console or IPMI access in case you lock yourself out.
  • Your admin IP address (check your IP).

How the levels work

LevelWhereProtects
DatacenterDatacenter → FirewallGlobal switch, cluster-wide rules, security groups, IP sets
NodeNode → FirewallThe Proxmox host itself
VM / CTVM → FirewallTraffic to that guest's NICs

Proxmox firewall setup step by step

  1. Go to Datacenter → Firewall → IPSet and create a set named management with your admin IPs. Proxmox automatically allows these to reach port 8006 and SSH when the datacenter firewall is on.
  2. Add datacenter rules: accept TCP 8006 (web UI) and 22 (SSH) from your admin IPs. In clusters, cluster traffic between nodes is allowed automatically on the local network.
  3. Under Datacenter → Firewall → Options, set Firewall to Yes. The default input policy is DROP.
  4. Test in a new browser window and SSH session before closing your existing ones.

Warning: If you lock yourself out, log in through the console and run pve-firewall stop, then fix the rules.

Rules for VMs and containers

  1. Open the VM → Firewall and add rules, for example accept TCP 80 and 443.
  2. In Firewall → Options for the VM, set Firewall to Yes and choose the input policy.
  3. On the VM's network device (Hardware → Network Device), tick Firewall. Rules do nothing without this.

Security groups

Create a group at Datacenter → Firewall → Security Group, for example webserver with ports 80 and 443, and insert it into any VM's rules. Changing the group updates every VM that uses it.

Check afterwards

  • pve-firewall status shows the firewall running.
  • Test blocked and allowed ports from outside with nc -zv HOST 8006.

Troubleshooting

  • Rules ignored for a VM: the Firewall box on the network device is not ticked, or the VM firewall option is off.
  • Cluster nodes lose quorum: make sure corosync traffic is allowed if nodes talk over a non-local network.

Frequently asked questions

Is the Proxmox firewall enough on its own?

It is a strong outer layer; keep a firewall inside important VMs too.

Does it support IPv6?

Yes, rules apply to both IPv4 and IPv6 unless you specify addresses.

Should port 8006 be open to the internet?

Better not. Restrict it to admin IPs or a VPN (WireGuard VPN).

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.