centos7如何关闭防火墙

时间:2023-01-09 23:56:52

1.centos7自带了firewall,而不是iptables:

  关闭firewall:

service firewalld stop

  或者:

systemctl stop firewalld

  禁止firewall:

systemctl mask firewalld

  下面是替换成iptables操作:

yum -y install iptables-services

  开机启动:

systemctl enable iptables

  启动iptables:

systemctl start iptables

that'it...