Centos6和Centos7如何关闭防火墙

    xiaoxiao2022-06-30  117

    Centos6:

    查看防火墙状态:service iptables status

    暂时关闭防火墙:service iptables stop

    永久关闭防火墙:chkconfig iptables off

    启动防火墙:service iptables start

    重启防火墙:service iptables restart

    永久关闭后启用:chkconfig iptables on

     

    Centos7:

    查看防火墙状态: systemctl status firewalld

    暂时关闭防火墙:systemctl stop firewalld

    永久关闭防火墙:systemctl disable firewalld 启动防火墙: systemctl start firewalld

    重启防火墙:systemctl restart firewalld 永久关闭后启用  : systemctl enable firewalld

     


    最新回复(0)