Unit iptables.service could not be found
Unit iptables.service could not be foundCentos7 以后都用 firewalld 取代了 iptables ,systemctl取代了service首先要检查自己的虚拟机的版本是 6还是7起初我错误的把CentOS6的命令套用在7上,出现了以下错误查看防火墙状态时候出现Redirecting to /bin/systemctl status iptabl
·
Unit iptables.service could not be found
Centos7 以后都用 firewalld 取代了 iptables ,systemctl取代了service
首先要检查自己的虚拟机的版本是 6还是7
起初我错误的把CentOS6的命令套用在7上,出现了以下错误
查看防火墙状态时候出现
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.
实际上CentOS7的命令已经更新了
1、查看防火墙状态
systemctl status firewalld.service
如果出现绿色的标注 “active(running)”,说明防火墙是开启状态
2、开启防火墙
systemctl start firewalld.service
3、关闭防火墙
systemctl stop firewalld.service
并检查一下防火墙状态
systemctl status firewalld.service
更多推荐
已为社区贡献3条内容
所有评论(0)