Proxmox VE 8 with Firewall in Routed Configuration. Netfilter POSTROUTING SNAT not working

Jul 3, 2023
2
0
1
Hi,
since switching to Proxmox VE 8 Postrouting SNAT (Unfortunately I must use NAT) in combination with the Proxmox Firewall is not working anymore even with conntrack zones enabled.
In Proxmox VE 7 it worked after adding


Code:
post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1 
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1



to the /etc/network/interfaces.


This is how my /etc/network/interfaces looks like
Code:
auto eno1 
iface eno1 inet static 
        address <Main public IP>/26 
        gateway <Gateway IP> 
 
 
 
 
 
 
auto vmbr0 
iface vmbr0 inet static 
        address <Main public IP>/32 
        bridge-ports none 
        bridge-stp off 
        bridge-fd 0 
        #fix for SNAT and VE Firewall 
        post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1 
        post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1 
 
 
        #SNAT for Backup 
        post-up iptables -t nat -A POSTROUTING -s <internel IP Backup>/32 -o eno1 -j SNAT --to-source <Main public IP> 
        post-down iptabels -t nat -D  POSTROUTING -s <internel IP Backup>/32 -o eno1 -j SNAT --to-source <Main public IP>


Any feedback is much appreciated.

Best regards
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!