Linux:防火墙iptables与firewalld的启停

发布时间 2023-08-07 16:39:21作者: ShineLe

Linux关闭防火墙firewall和iptables命令_永久关闭iptables防火墙_红烧柯基的博客-CSDN博客

Linux防火墙——iptables以及firewalld的使用介绍_树下一少年的博客-CSDN博客

干货!Linux 防火墙配置 ( iptables 和 firewalld )_数据包_规则_进行

 

iptables与firewalld

1、状态

systemctl status firewalld
service  iptables status

2、关闭

systemctl stop firewalld
service  iptables stop

3、启动

systemctl start firewalld
service  iptables start

4、开机启动

systemctl enable firewalld

chkconfig iptables on

5、取消开机启动

systemctl disable firewalld

chkconfig iptables off

 

如果stop了之后无法start或者restart firwalld(报错failed to start firewalld dynamic firewall daemon),那么请先用enable将其设置开机重启,然后再reboot