iptables on Amazon Linux 2

Home » Uncategorized » iptables on Amazon Linux 2
Uncategorized No Comments
This command saves rules to iptables.
>sudo service iptables save
However if "iptables" service not enabled it will display error:
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

To check the service status
>sudo systemctl status iptables
If "iptables" service not enabled it will say "Unit iptables.service could not be found." 

Perform following steps to enable it.
>sudo yum install iptables-services -y
>sudo systemctl enable iptables
>sudo systemctl start iptables

Then you can 
>sudo service iptables save

https://serverfault.com/questions/1020536/save-iptables-firewall-rules-on-amazon-linux-2