Guides

How to Configure the Proxmox Firewall: Security Guide

How do you enable the Proxmox built-in firewall? Port blocking and rules at cluster, host and virtual machine level.

If you host an internet-facing physical server, hundreds of bots probe it every minute. Many system administrators rely on an external firewall appliance, but Proxmox includes a capable firewall based on Linux iptables/nftables.

Let's see how to configure the Proxmox firewall step by step without locking yourself out of the server.

Understanding the Three-Layer Architecture

In Proxmox, the firewall operates on three levels:

  1. Cluster Level: General rules that apply to the entire server cluster.
  2. Host (Node) Level: Rules that protect the physical server itself.
  3. VM / CT Level: The specific rules of the virtual machines or containers themselves.

Step 1: Activating the Firewall

Before enabling the firewall, make sure you will retain access to the server.

  • From the left menu, go to the Datacenter -> Firewall tab.
  • Before selecting 'Firewall: Yes' under Options, switch to the Rules tab.
  • Be sure to add a rule that allows the web interface port (8006) and SSH port (22) from your own IP address or globally:
    • Direction: in
    • Action: ACCEPT
    • Macro or Port: 8006, 22
    • Protocol: tcp

If you turn on the firewall without adding this rule, you will lose access to the web panel and SSH!

Step 2: Setting Default Policies

The safest approach is to drop incoming traffic by default and allow only explicitly permitted connections. From the Options menu:

  • Input Policy: DROP
  • Output Policy: ACCEPT This limits unwanted incoming connections; a firewall does not guarantee protection against every attack.

Step 3: Isolating Virtual Machines from Each Other

If you are selling VPS, you can define rules in each virtual machine's own Firewall tab to prevent customer A from infiltrating customer B's virtual machine over the network. Check the official documentation for the options supported by the firewall application and version you are using; do not assume that iptables and nftables provide the same features. Evaluate DDoS capacity on the provider side as well.

Evaluate network rules and account authorizations together

Treat firewall rules and user roles in the management panel as separate controls. You can use the cloud account security and passkey guide to review team access and session management.