]> git.proxmox.com Git - pve-manager.git/commit
firewall: expose configuration option for new nftables firewall
authorStefan Hanreich <s.hanreich@proxmox.com>
Fri, 19 Apr 2024 09:42:37 +0000 (11:42 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Apr 2024 18:14:47 +0000 (20:14 +0200)
commita18e436b5d7cae5c2e7600ad30a7758ea079bb69
treecdb30e548e13648dbedb6642d66e8de030f071f1
parentbbef6b29b11f6bec3f6511e68732c754b986df31
firewall: expose configuration option for new nftables firewall

There's a new firewall implementation available as `proxmox-firewall`
package, in contrast to the existing `pve-firewall` package it is
using nftables directly, not the legacy iptables, and can thus
leverage a modern stack with atomic updates, avoiding the need for
different tools (e.g., ebtables), and not requiring intermediate
firewall bridges to handle VM flow correctly. Additionally it's
written in rust, making it more efficient and safer to change.

The new implementation is using the same configuration file as source
and should be mostly the same in semantic behavior, it basically is a
drop-in replacement besides one known issue:

There is currently one major issue that we still need to solve:
REJECTing packets from the guest firewalls is currently not possible
for incoming traffic (it will instead be dropped).

This is due to the fact that we are using the postrouting hook of
nftables in a table with type bridge for incoming traffic. In the
bridge table in the postrouting hook we cannot tell whether the packet
has also been sent to other ports in the bridge (e.g. when a MAC has
not yet been learned and the packet then gets flooded to all bridge
ports). If we would then REJECT a packet in the postrouting hook this
can lead to a bug where the firewall rules for one guest REJECT a
packet and send a response (RST for TCP, ICMP port/host-unreachable
otherwise).

While this is being addressed, and the whole stack is better tested in
general, the new FW will be only enabled if the admin enables a
boolean configuration which this patch exposes on the UI.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
www/manager6/grid/FirewallOptions.js