Linux系統中無iptables文件

CentOS7開始,默認是沒有iptables的,而是使用firewall防火牆。本文將屏蔽掉firewall,使用iptables

Centos7版本解決方法:

1、停止並屏蔽firewalld服務

停止 systemctl stop firewalld
屏蔽 systemctl mask firewalld
2、安裝iptables-service軟件包

yum install iptables-services

3、在引導時啓用iptables服務

systemctl enable iptables

4、啓動iptables服務

systemctl start iptables

5、保存防火牆規則

service iptables save
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章