iptables-save: dump iptables rules
iptables-save [-t table]
Options you will use
-t, --table TABLE- restrict output to only one table
Gotchas
- The rules as iptables-restore reads them, chain by chain. Needs root.
- iptables-nft prints every built-in chain of a table, also the ones nothing created yet (nft list ruleset shows only the real ones).
Try iptables-save in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.