NAT的設定 - BBS
By Todd Johnson
at 2006-11-28T15:33
at 2006-11-28T15:33
Table of Contents
http://0rz.tw/d11qp
我想問第九行後面的的
# Throw away RFC 1918 networks
${ipfw} add deny ip from 10.0.0.0/8 to any in via ${oif}
${ipfw} add deny ip from 172.16.0.0/12 to any in via ${oif}
${ipfw} add deny ip from 192.168.0.0/16 to any in via ${oif}
這是設所有private ip都不能直接連到外面嗎?
=====================================================================
${ipfw} /sbin/ipfw ipfw這三個有什麼差別嗎??
=====================================================================
我不太懂interface-spec的in out意思
in指流入封包 out指流出封包 是如下圖嗎??
in in
<--- NAT <----
內部 ──── server ──── 外部
---> ---->
out out
那下面這個例子
# 限制內部網域對外下載最大頻寬為 20KBytes/s,上傳最大頻寬為 5KBytes/s
ipfw pipe 20 config bw 20KBytes/s
ipfw add pipe 20 ip from any to 192.168.0.1/24 out (這為什麼不是in呢)
ipfw pipe 30 config bw 5KBytes/s
ipfw add pipe 30 ip from 192.168.0.1/24 to any in (為什麼不是out呢)
=====================================================================
最後一個問題 用hub來接NAT server和其他電腦
┌───────────────┐ NAT那台是接在LAN的孔還是
│┌┐ ┌┐ ┌┐ ┌┐ ┌┐ │ WAN的孔呢??還是根本沒差??
│└┘ └┘ └┘ └┘ └┘ │
└───────────────┘
└──┴─┬┴──┘ │
LAN WAN
謝謝回答 m(_ _)m
--
我想問第九行後面的的
# Throw away RFC 1918 networks
${ipfw} add deny ip from 10.0.0.0/8 to any in via ${oif}
${ipfw} add deny ip from 172.16.0.0/12 to any in via ${oif}
${ipfw} add deny ip from 192.168.0.0/16 to any in via ${oif}
這是設所有private ip都不能直接連到外面嗎?
=====================================================================
${ipfw} /sbin/ipfw ipfw這三個有什麼差別嗎??
=====================================================================
我不太懂interface-spec的in out意思
in指流入封包 out指流出封包 是如下圖嗎??
in in
<--- NAT <----
內部 ──── server ──── 外部
---> ---->
out out
那下面這個例子
# 限制內部網域對外下載最大頻寬為 20KBytes/s,上傳最大頻寬為 5KBytes/s
ipfw pipe 20 config bw 20KBytes/s
ipfw add pipe 20 ip from any to 192.168.0.1/24 out (這為什麼不是in呢)
ipfw pipe 30 config bw 5KBytes/s
ipfw add pipe 30 ip from 192.168.0.1/24 to any in (為什麼不是out呢)
=====================================================================
最後一個問題 用hub來接NAT server和其他電腦
┌───────────────┐ NAT那台是接在LAN的孔還是
│┌┐ ┌┐ ┌┐ ┌┐ ┌┐ │ WAN的孔呢??還是根本沒差??
│└┘ └┘ └┘ └┘ └┘ │
└───────────────┘
└──┴─┬┴──┘ │
LAN WAN
謝謝回答 m(_ _)m
--
Tags:
BBS
All Comments
Related Posts
不透過鍵盤就scp檔案
By Doris
at 2006-11-26T22:40
at 2006-11-26T22:40
將/usr mount到別顆硬碟
By Olive
at 2006-11-26T03:17
at 2006-11-26T03:17
將/usr mount到別顆硬碟
By Vanessa
at 2006-11-24T20:21
at 2006-11-24T20:21
新手的問題
By Enid
at 2006-11-24T12:01
at 2006-11-24T12:01
新手的問題
By Lydia
at 2006-11-23T22:53
at 2006-11-23T22:53