CentOS 7.0的防火牆默認是firewall , 今天教大家設定iptables防火牆~
先關閉firewall
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall開機啟動
firewallcmd state #查看默認防火牆狀態(關閉後顯示notrunning,開啟後顯示running)
安裝配置iptables防火牆
yum install iptables iptablesservice

設定iptables開機啟動

systemctl restart iptables.service #最後重啟防火牆使配置生效
systemctl enable iptables.service #設置防火牆開機啟動
advertising
Newage簡易教程CentOS 7 firewall,centos7 install iptables,iptables,防火牆
CentOS 7.0的防火牆默認是firewall , 今天教大家設定iptables為防火牆~ 先關閉firewall systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall開機啟動 firewall-cmd --state #查看默認防火牆狀態(關閉後顯示notrunning,開啟後顯示running) 安裝配置iptables防火牆 yum install iptables iptables-service 設定iptables開機啟動 systemctl restart iptables.service #最後重啟防火牆使配置生效 systemctl enable iptables.service #設置防火牆開機啟動