Linux下无iptables 防火墙文件


参考:https://blog.csdn.net/duce0304/article/details/88389360

 

在刚买的ceno 7服务器中安装vsftpd之后想打开防火墙端口  结果/etc/sysconfig/目录下没有iptables文件  这时候就需要自己写一个iptables文件并且写入相关指令  然后使用 service iptables save 时显示 The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

百思不得其解,然后上网百度之后,找到了解决方法:
首先不管防火墙有没有关 都使用systemctl stop firewalld 关闭防火墙
然后使用 yum install iptables-services 安装或更新服务
再使用systemctl enable iptables 启动iptables
最后 systemctl start iptables 打开iptables
大功告成

试试service iptables save


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM