重启防火墙(iptables)命令#service iptable restart失效
#service iptable restart
Redirecting to /bin/systemctl restart iptable.service
Failed to issue method call: Unit iptable.service failed to load: No such file or directory.
据说从某个版本的Linux系统(CenterOS/RedHat)后就将service命令改了,如
#systemctl restart iptables.service
#iptables -L
重启防火墙成功~~~~
看到评论的朋友有推荐,觉得写的很好,如不能解决,可参考如下两位博主的做法:
- CentOS7开启防火墙及特定端口 https://blog.csdn.net/zll_0405/article/details/81208606
- https://blog.csdn.net/qq_42204928/article/details/100056434