1、我一开始使用 service iptables status 命令查看防火墙状态,结果显示 Unit iptables.service could not be found
2、这是因为centos7中默认使用 firewalld,没有iptables了
3、在centos7中:
systemctl stop firewalld // 临时关闭
systemctl disable firewalld //禁止开机启动
4、如果想使用 iptables 命令
可以 yum install -y iptables-services 命令来安装iptables相关命令,这时仍可使用 iptables;
service iptables status //检查防火墙状态