Search code examples
linuxiptables

Iptables: Reasons for choosing pre-up/up/post-up rsp. pre-down/down/post-down


Setting up iptables rules, what are the specific reasons for pre-up/up/post-up rsp. pre-down/down/post-down?

E.g setting Default Policies in pre-up and explicit rules in up/post-up?

In my understanding, if I only want to setup e.g iptables-save < ..., it doesn't matter. Am I wrong?


Solution

  • The idea is that the firewall is up before any network traffic can happen on a certain interface or all interfaces and that the firewall is up as long as networking is possible, meaning as long as the interface(s) is up.