关于centos 7 中service iptables save 指令使用失败的结局方案
在剛買的ceno 7服務(wù)器中安裝vsftpd之后想打開防火墻端口? 結(jié)果/etc/sysconfig/目錄下沒有iptables文件? 這時候就需要自己寫一個iptables文件并且寫入相關(guān)指令? 然后使用 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.
百思不得其解,然后上網(wǎng)百度之后,找到了解決方法:
首先不管防火墻有沒有關(guān) 都使用systemctl stop firewalld 關(guān)閉防火墻
然后使用 yum install iptables-services 安裝或更新服務(wù)
再使用systemctl enable iptables 啟動iptables
最后 systemctl start iptables 打開iptables
大功告成
試試service iptables save
轉(zhuǎn)載于:https://blog.51cto.com/10600928/1975469
總結(jié)
以上是生活随笔為你收集整理的关于centos 7 中service iptables save 指令使用失败的结局方案的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 知识库的构建 6-1 语义网 Seman
- 下一篇: Spring Boot 学习(一) 快速