解决Linux关闭或开启防火墙出现Unit iptables.service failed to load: No such file or directory.
报错:Redirecting to /bin/systemctl stop iptables.service Failed to stop iptables.或是Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory.解决方法:注意:以下操作均在...
·
报错:
Redirecting to /bin/systemctl stop iptables.service Failed to stop iptables.
或是
Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory.
解决方法:
注意:以下操作均在root用户下进行!
1、执行以下命令:
systemctl stop firewalld
systemctl mask firewalld
2、安装iptables-services:
yum install iptables-services
3、设置开机启动:
systemctl enable iptables
systemctl stop iptables
systemctl start iptables
systemctl restart iptables
systemctl reload iptables
4、保存设置:
service iptables save
更多推荐
所有评论(0)