Using iptables-persistent for custom rules

Mecanik

Well-Known Member
Mar 2, 2017
173
6
58
33
I'm having a really hard time trying to add and keep some custom iptables rules. Reading across several threads, iptables-persistent came to light.

With that being said I have installed it with apt-get install -y iptables-persistent and all the rules got saved into the corresponding files (/etc/iptables).

Now I have a few questions:

  • If I add some rules into the files, how do I "load" them? restart pve-firewall?
  • How do I ensure these rules are loaded upon reboot? I saw several "methods", but I want the correct one.
  • Last but not least, I assume if I make later changes to any settings inside PVE firewall GUI, I have to save them again, correct? If this is the case, it will not overwrite my previous rules?

Many thanks