Centos关闭和开启防火墙命令

warning: 这篇文章距离上次修改已过1258天,其中的内容可能已经有所变动。

CentOS7

查看防火墙状态:systemctl status firewalld
关闭防火墙:systemctl stop firewalld
启动防火墙:systemctl start firewalld
重启防火墙:systemctl restart firewalld
禁用防火墙开机自启:systemctl disable firewalld
开启防火墙开机自启:systemctl enable firewalld

CentOS6.5

查看防火墙状态:service iptable status
关闭防火墙:servcie iptables stop
启动防火墙:servcie iptables start
重启防火墙:servcie iptables restart
禁用防火墙开机自启:chkconfig iptables off
开启防火墙开机自启:chkconfig iptables on

添加新评论