赞
踩
原因:CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替。service命令只保留下了极少部分使用,大部分命令都要改用systemctl使用。
首先停止防火墙
1.systemctl stop firewalld
2.systemctl mask firewalld
然后安装iptables-services
3.yum install iptables-services
设置开机启动防火墙
4.systemctl enable iptables
可以使用下面命令管理iptables
5.systemctl [stop|start|restart] iptables
这时可以保存防火墙规则了
- 6.service iptables save
- or
- /usr/libexec/iptables/iptables.init save
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。