How To Save iptables To Disk On Amazon Linux 2
![Published Date](https://www.ericmichaelstone.com/wp-content/themes/me3/images/calendar.png)
I wanted to save the iptables list to disk, but got an error when I tried:
# service iptables save
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.
The solution was to install the iptables-services
package:
# yum install iptables-services -y
...
Installed:
iptables-services.x86_64 0:1.8.4-10.amzn2.1.2
Complete!
I was then able to save properly:
root@inbound2:/var/log # service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
Leave Your Comment![Leave a comment](https://www.ericmichaelstone.com/wp-content/themes/me3/images/comments.png)
All fields marked with "*" are required.