korn-sudo / Project-Fog

Project Fog is an Ubuntu and Debian-based VPS AutoScript. Tunneling software comes pre-installed.
The Unlicense
163 stars 100 forks source link

Overriding my iptables #6

Closed rexsllemel closed 2 years ago

rexsllemel commented 2 years ago

When I make a custom rule in iptables, it always gone when reboot. I am guessing your script flushing the iptables. That's bad.

korn-sudo commented 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