CentOS7 防火牆關閉

CentOS7 的防火牆配置跟之前版本有很大區別,通過大量嘗試,終於找到解決問題的關鍵spa

CentOS7這個版本的防火牆默認使用的是firewall,與以前的版本使用iptables不同。按以下方便配置防火牆:code

一、關閉防火牆:sudo systemctl stop firewalld.serviceip

二、關閉開機啓動:sudo systemctl disable firewalld.serviceit

 

三、安裝iptables防火牆table

執行如下命令安裝iptables防火牆:sudo yum install iptables-servicesstream

?配置

四、配置iptables防火牆,打開指定端口(具體跟之前版本同樣,網上介紹不少,這裏很少介紹了)iptables

 

5. 設置iptables防火牆開機啓動:sudo systemctl enable iptablesservice

?防火牆

OK了,根據配置的端口就能夠訪問了

相關文章
相關標籤/搜索