Friday, June 18, 2021

Persist IpTables (firewall) Linux Redhat

repoquery iptables-services
iptables-services-0:1.4.21-35.el7.x86_64

rpm -qa | grep iptables
iptables-1.4.21-33.el7.x86_64

https://serverfault.com/questions/801350/how-to-save-iptables-configuration-on-redhat-enterprise-server-7/801352#801352

https://kerneltalks.com/virtualization/how-to-reset-iptables-to-default-settings

https://upcloud.com/community/tutorials/configure-iptables-centos/

https://forums.centos.org/viewtopic.php?t=68917

 
 So, the structure is: 
 iptables -> Tables -> Chains -> Rules.

IPTABLES 

  • Tables
  • Chains
  • Rules

sudo yum install iptables-services
Once installed, start and enable the service.


sudo systemctl start iptables
sudo systemctl enable iptables
Afterwards, you can simply save the current rules using the following command.


sudo service iptables save

/etc/sysconfig/iptables


[ec2-user@ip-10-79-197-70 sysconfig]$ sudo ls | grep ip
ip6tables
ip6tables-config
iptables
iptables-config
network-scripts

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass