linux開啟及關閉防火牆

2021-09-27 02:23:29 字數 357 閱讀 3952

開啟: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

Linux防火牆關閉開啟

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

Linux關閉 開啟防火牆命令

linux還是比較常用的,於是我研究了一下linux關閉防火牆命令,在這裡拿出來和大家分享一下,希望你能學會linux關閉防火牆命令 1 永久性生效,重啟後不會復原 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後復原 開啟 ...

Linux下關閉開啟防火牆

1 重啟後生效 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後失效 開啟 service iptables start 關閉 service iptables stop 需要說明的是對於linux下的其它服務都可以用以上命令...