參考: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