iptables rules are created and modified using iptables command, saved using iptables-save and we can load the saved files using iptables-restore command.
It is possible to create a script using the above commands to create and save an iptables file, and load it again at system startup. But there is an easier way.
`iptables-persistent` for Debian based systems
The iptables-persistent package automatically loads saved iptables rules. It does this by using the rules stored in /etc/iptables/rules.v4 for IPv4, which are generated and saved when the package is installed.
To use iptables-persistent, install the package:
sudo apt-get install iptables-persistentNote:
iptablesis considered legacy. Its successor,nftables, is now the default firewall framework on most modern Linux distributions (Debian 10+, RHEL 8+, Ubuntu 20.10+).nftablesoffers better performance, a cleaner syntax, and unified handling of IPv4/IPv6 rules. Whileiptablescommands still work on many systems via a compatibility layer (iptables-nft), new setups should usenftdirectly. See the nftables wiki for migration guidance.
Keep reading
Control Root Login Using SSH
How to disable password-based root login by replacing it with SSH key-based login.
Copy from a Protected Google Sheet/Doc
Google Docs/Sheets give users ability to 'lock' their content. This makes files viewable but no editing or copying will work. Here is how to copy from a protected Google Sheet/Doc.
