Linux關閉 開啟防火牆命令

2021-06-20 17:43:36 字數 646 閱讀 3138

linux還是比較常用的,於是我研究了一下linux關閉防火牆命令,在這裡拿出來和大家分享一下,希望你能學會linux關閉防火牆命令 。

1) 永久性生效,重啟後不會復原

開啟: chkconfig iptables on

關閉: chkconfig iptables off

2) 即時生效,重啟後復原

開啟: service iptables start

關閉: service iptables stop

需要說明的是對於linux下的其它服務都可以用以上命令執行開啟和關閉操作。

在開啟了防火牆時,做如下設定,開啟相關埠,

修改/etc/sysconfig/iptables 檔案,新增以下內容:

-a rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 80 -j accept

-a rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 22 -j accept

3)重新啟動防火牆: service iptables restart

通過本文你了解到了linux關閉防火牆命令,以及怎樣安裝好linux關閉防火牆命令。希望你分享本文。

Linux防火牆關閉開啟

今日在linux測試環境上裝了乙個tomcat,在windows本機上訪問無果 在linux 192.168.10.97 機器上,執行wget 能夠正常獲取資料。於是斷定是防火牆開啟了。於是查詢linux防火牆關閉的方法 檢視防火牆狀態 chkconfig iptables list 1 重啟後生效...

Linux關閉防火牆命令

linux關閉防火牆命令 1 永久性生效,重啟後不會復原 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後復原 開啟 service iptables start 關閉 service iptables stop 3 在開啟了...

Linux關閉防火牆命令

linux關閉防火牆命令 1 永久性生效,重啟後不會復原 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後復原 開啟 service iptables start 關閉 service iptables stop 3 在開啟了...