1. 程式人生 > >Linux系統中無iptables檔案

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