赞
踩
CentOS7中若使用CentOS6的关闭防火墙命令会报错
stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
CentOS7关闭防火墙的步骤如下
systemctl status firewalld.service
active(running)
,表示防火墙已经被打开了。systemctl stop firewalld.service
命令,临时关闭防火墙。systemctl status firewalld.service
,下方出现disavtive(dead)
,说明防火墙已经关闭。systemctl disable firewalld.service
就可以永久关闭防火墙。如果安装了iptables-service,也可以使用下面的命令
yum install -y iptables-services
//关闭防火墙
service iptables stop
Redirecting to /bin/systemctl stop iptables.service
//检查防火墙状态
service iptables status
Redirecting to /bin/systemctl status iptables.service
鈼iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: inactive (dead)
注:CentOS6关闭防火墙的命令如下
//临时关闭
service iptables stop
//禁止开机启动
chkconfig iptables off
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。