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.

1 Answer 1


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.

  • Thanks! Do you have a trustable source for this information or do I have to trust you? Aug 17, 2018 at 15:02
  • You could read the man page, or the source code, or simply gain experience with it. Any of these would suffice. Aug 17, 2018 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.