Issue
The firewall does not automatically load when the server starts.
Cause
Debian/Ubuntu servers do not have any default IPTables configuration files or /etc/init.d scripts.
Solution
Create /etc/iptables.up.rules. Example below to allow SSH (22), SMTP (25), HTTP (80), HTTPS (443), POP3 (110) and MySQL (3306)
First create your /etc/iptables.up.rules file by running this
command:
Then edit that file and use the example content below to create your
rules.
Create
/etc/network/if-pre-up.d/iptables with the following content:.
Make /etc/network/if-pre-up.d/iptables executable.