Been looking where does netfilter-persistent store its rules but could not find any documentation about it on help.ubuntu.com.

Does anybody know where does netfilter-persistent in Ubuntu save its rules so it survives a reboot?

1 Answer 1


Found it only works if you install 'iptables-persistent' package as well.

sudo apt-get install iptables-persistent netfilter-persistent

It will be saved in /etc/iptables/rules.v[4-6]

If you only install netfilter-persistent, it wont save any configuration

  • oh, that's why! Thanks for pointing that out. :)
    – chrone
    May 12, 2017 at 8:54
  • 2
    Actually, just sudo apt install iptables-persistent is enough. It will install netfilter-persistent as dependency automatically.
    – ruuter
    Mar 18, 2020 at 12:23

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.