how do i check whether an ufw rule is reboot-safe?

klaus thorn asked:

So I have just added a firewall rule using ufw. How do I know whether I have to do additional steps to make this rule also automatically present after reboot?

(2nd question, but less important to me: If they are needed, which steps?)

For example: Do I have to check for installed/enabled/configured iptables-save? Do I have to put the rule into /etc/ufw/? (where?) Is there a rule like: If I am using Ubuntu, then ufw will always remeber state after reboot?

I am not used to work with ufw or iptables-save. I just read rumors in forums and the man page for ufw.

If you have to assume an operating system for your answer then please assume Ubuntu 16.04.

My answer:

ufw doesn’t make a distinction between the running state of the firewall and the permanent saved state. All rule changes take effect immediately and are persistent.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.