linux如何關閉防火牆

2022-03-29 23:44:38 字數 482 閱讀 8840

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

linux如何關閉防火牆

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

linux如何關閉防火牆

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

linux如何關閉防火牆

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