Loading
0

CentOS 6/7关闭防火墙命令

CentOS6关闭防火墙:

service iptables stop //临时关闭
chkconfig iptables off //禁止开机启动

注: Centos7使用同样命令,会提示

stop iptables.service 
Failed to stop iptables.service: Unit iptables.service not loaded.

CentOS7关闭防火墙:

systemctl stop firewalld //临时关闭

systemctl disable firewalld //禁止开机启动

Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

也可以安装iptables-services,使用下面的命令

yum install -y iptables-services //安装iptables-services
service iptables stop //关闭防火墙
 
service iptables status //检查防火墙状态
本文由A1d4m's blog(www.ychack.com)提供,文章原创版权所有,转载请注明!