作者joexx12 (窮人家的小孩)
看板Linux
標題Re: [問題] iptables的一些問題
時間Wed Apr 1 22:09:08 2009
※ 引述《cbolong (波波龍)》之銘言:
: 1.
[恕刪]
你可以google一下 iptables +圖解 etc...
畫圖比較好懂
prerouting routing decsion forward postrouting
————→○——————→◇——————→○——————→○——————→
↓ ↑
○input ○output
↓ ↑
[local process]——————— ——┘
: 2.
: 那mangle和filter還有nat到底差在哪?
mangle 指的是修改封包內容
filter 是過濾封包內容
nat就轉址
多多google 應該有蠻多可以看的說明
1.table的類別(mangle/filter/nat)
2.chain 是要input /output/forward
3.rules
1.2.3加起來就是一條完整iptables的規則
實作上就有好幾種用法 依據需求去組合變化
簡易firewall 通常只針對input去做控管
至於 是使用 -s or -d 看你需要做的動作決定
簡單講解 有錯請指教@_@
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.126.72.6
※ 編輯: joexx12 來自: 59.126.72.6 (04/01 22:09)
※ 編輯: joexx12 來自: 59.126.72.6 (04/01 22:14)
※ 編輯: joexx12 來自: 59.126.72.6 (04/01 22:16)
推 cbolong:圖看蠻多次了 那些是類別我也知 只是不知道怎麼清楚的使用 04/01 22:58
→ joexx12:基本懂的話 多想想例子應該就知道什麼時候要怎用 04/01 23:03
推 cbolong:因為大部份都使用filter 轉址用nat 04/01 23:06
→ cbolong:所以才對mangle有點疑惑 不知道什麼時候要用到它 04/01 23:06
→ joexx12:一般實務上 很少去用到mangle 04/01 23:12
推 cbolong:那mangle使用時間是和filter一樣嗎 都有in out 04/01 23:15