《centos7如何去掉firewalld改用Iptables命令?》要點:
本文介紹了centos7如何去掉firewalld改用Iptables命令?,希望對您有用。如果有疑問,可以聯系我們。
centos 7默認是用firewalld,那如何改為Iptables防火墻?
centos 7中不可執行: # service iptables save
[root@VM_0_6_centos ~]# 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.
解決方法:
1.先執行如下命令:
systemctl stop firewalld
systemctl mask firewalld
2.安裝iptables services
yum -y install iptables-services
3.設置開機啟動
systemctl enable iptables
4.重啟iptables service
systemctl restart iptables
命令:systemctl [stop|start|restart] iptables
5.執行保存配置命令
service iptables save