回覆列表
  • 1 # thrfr2643

    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

  • 2 # 使用者1465424935672

    service iptables status或者直接iptables -L 檢視有無規則 如果顯示沒有防火牆規則,那就是不起作用;反之就是防火牆在起作用.

  • 中秋節和大豐收的關聯?
  • 為什麼窮孩子早當家?