# first install iptables-persistent (sudo apt install iptables-persistent) sudo netfilter-persistent save