SDN Nat-Regeln werden mehrfach angelegt

jojowillingen

Member
Jul 15, 2021
6
0
6
22
Hallo zusammen,


ich arbeite mich aktuell mit den verschiedenen Optionen der SDN ein.
Dabei ist mir aufgefallen, dass wenn ich SNAT anharke oder generell up und down-Regeln in den Interfaces hinzufüge diese mehrfach angelegt aber nie gelöscht werden.

Code:
auto default0
iface default0
        address 192.168.0.1/24
        post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o vmbr2 -j SNAT --to-source 85.X.X.X
        post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr2 -j SNAT --to-source 85.X.X.X
        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
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        mtu 1500
        ip-forward on

Die Post-Up-Regeln werden ausgeführt; Die Post-down nicht. Auch wenn ich pre-down oder down verwende nicht.

Jemand eine Idee?


Grüße
Johannes
 

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!