Closed rexsllemel closed 2 years ago
No. my iptables rules cannot flush yours. It happens because every reboot iptable rules will gone, you need to set it every reboot like this:
[Unit] Description = Load /etc/iptables.rules DefaultDependencies=no Before=network-pre.target Wants=network-pre.target Wants=systemd-modules-load.service local-fs.target After=systemd-modules-load.service local-fs.target [Service] Type=oneshot ExecStart=/etc/network/if-pre-up.d/iptablesload
When I make a custom rule in iptables, it always gone when reboot. I am guessing your script flushing the iptables. That's bad.