在centOS 7系统中运行
service iptables stop
发现出错
解决办法
1. 使用systemctl
systemctl [start|stop|restart|save|status] iptables.service
2. 安装iptables-services
切换到root用户下,执行:
yum install iptables-servicessystemctl enable iptables.service //设置开机启动
之后就可以使用以下指令了:
service iptables [start|stop|restart|save|status]

本文介绍在CentOS7中遇到无法通过service命令停止iptables服务的问题及解决方案。包括使用systemctl命令替代service命令的方法,以及通过安装iptables-services包来启用传统service命令的方式。
1573

被折叠的 条评论
为什么被折叠?



