Software running:
pve-firewall: enabled/running (pending changes)
proxmox-firewall disabled
nftables disabled
ebtables disabled
pve 8.4.1
Problem:
Every time I run ifreload -a, the system adds duplicate SNAT rules in the nat table (POSTROUTING chain). After a few reloads, I end up with multiple identical entries like:
This seems to happen because the SDN-generated /etc/network/interfaces.d/* files include post-up iptables commands to add SNAT rules, but ifreload -a (via ifupdown2) doesn't execute post-down, so rules never get cleaned up and keep stacking up on every reload.
My questions:
pve-firewall: enabled/running (pending changes)
proxmox-firewall disabled
nftables disabled
ebtables disabled
pve 8.4.1
Problem:
Every time I run ifreload -a, the system adds duplicate SNAT rules in the nat table (POSTROUTING chain). After a few reloads, I end up with multiple identical entries like:
Code:
-A POSTROUTING -s 10.2.1.0/24 -o vmbr0 -j SNAT --to-source x.x.x.x
-A POSTROUTING -s 10.2.2.0/24 -o vmbr0 -j SNAT --to-source x.x.x.x
-A POSTROUTING -s 10.2.1.0/24 -o vmbr0 -j SNAT --to-source x.x.x.x
-A POSTROUTING -s 10.2.2.0/24 -o vmbr0 -j SNAT --to-source x.x.x.x
This seems to happen because the SDN-generated /etc/network/interfaces.d/* files include post-up iptables commands to add SNAT rules, but ifreload -a (via ifupdown2) doesn't execute post-down, so rules never get cleaned up and keep stacking up on every reload.
My questions:
- Is there an official or recommended way to handle SNAT in SDN zones without causing duplication on interface reloads?
- Could the SDN-generated post-up rules be made idempotent by using iptables -C checks?
- Is there a plan to handle this more cleanly in Proxmox SDN?