[問題] iptables關閉不了port?

看板Linux作者 ( .)時間17年前 (2008/12/25 14:41), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
我目前的INPUT chain如下: Chain INPUT (policy DROP) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpts:!vnc-server:5905 ACCEPT tcp -- anywhere anywhere tcp dpt:!telnet ACCEPT tcp -- anywhere anywhere tcp dpt:!ftp ACCEPT tcp -- anywhere anywhere tcp dpt:!ftp-data DROP tcp -- anywhere anywhere tcp dpt:!ssh input_int 0 -- anywhere anywhere DROP tcp -- anywhere anywhere tcp dpt:!http 我的電腦有兩張網卡,一張針對內網(eth1)一張對網際網路(eth0)。 我希望eth1 的port全部開放,但是eth0可以對外連線但是要連過來只能是ssh、http 、https、ftp和VNC。 我的OUTPUT chain已經全部開放。 我在嘗試檢查iptables的阻擋功能時設定了上述的input chain。但是我發現設定了 上述的chain之後,那一台電腦還是可以被ssh連線,也可以用firefox瀏覽別的網頁。 顯然我設定的drop是一點用也沒有。我確定我下指令時有用-i eth0。 想請各位幫我檢查一下我是不是少設定了什麼? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.109.112.154 ※ 編輯: ICBM 來自: 140.109.112.154 (12/25 14:42)
文章代碼(AID): #19KoiAwJ (Linux)
文章代碼(AID): #19KoiAwJ (Linux)