PPPoE Server的NAT設定 - Linux

By Wallis
at 2008-05-16T20:54
at 2008-05-16T20:54
Table of Contents
※ 引述《xexxo2002 (xexxo2002)》之銘言:
: ※ 引述《Richie1105 ( )》之銘言:
: : http://photo.xuite.net/richie1105/2519747/1.jpg
: : 請問各位先進,我用Fedora 8架了一台PPPoE Server
: : 此Server上有2張網卡,eth0對外、eth1對內
: : 當client端連入server後,會多出ppp(over eth1)的介面
: : 1、請問我該如何下iptables的指令,讓client端能透過eth0對外連線呢?
: : 2、我是否該另外增加route在eth1上?
: : 3、eth1需要設定gateway嗎?
: : ps.圖只要看框框內的部份就好,外圍環境我不是很了解
: : 麻煩了 ^^
: 1. iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
: ^^^^^^^^^^^
: 內網網段
: 2. 對內網路介面不需設 route,iptables 會自動把從 eth1 進來的封
: 包做 masquerade 的動作
: 3. eth1 也不用設 gateway
非常感謝您,我的PPPoE Server已可成功對外連線
後來我用相同的環境架設PPTP Server,也下了相同的iptables指令
結果在Client端ping的到DNS,卻無法以輸入"網址"的方法連到外面網頁
請問發生的原因有哪些呢?
--
: ※ 引述《Richie1105 ( )》之銘言:
: : http://photo.xuite.net/richie1105/2519747/1.jpg

: : 此Server上有2張網卡,eth0對外、eth1對內
: : 當client端連入server後,會多出ppp(over eth1)的介面
: : 1、請問我該如何下iptables的指令,讓client端能透過eth0對外連線呢?
: : 2、我是否該另外增加route在eth1上?
: : 3、eth1需要設定gateway嗎?
: : ps.圖只要看框框內的部份就好,外圍環境我不是很了解
: : 麻煩了 ^^
: 1. iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
: ^^^^^^^^^^^
: 內網網段
: 2. 對內網路介面不需設 route,iptables 會自動把從 eth1 進來的封
: 包做 masquerade 的動作
: 3. eth1 也不用設 gateway
非常感謝您,我的PPPoE Server已可成功對外連線
後來我用相同的環境架設PPTP Server,也下了相同的iptables指令
結果在Client端ping的到DNS,卻無法以輸入"網址"的方法連到外面網頁
請問發生的原因有哪些呢?
--
Tags:
Linux
All Comments
Related Posts
Ubuntu無線網路的怪問題

By Joe
at 2008-05-16T15:25
at 2008-05-16T15:25
kernel-headers

By Hazel
at 2008-05-16T14:02
at 2008-05-16T14:02
emesene

By Zanna
at 2008-05-16T13:19
at 2008-05-16T13:19
關於horde

By Charlie
at 2008-05-16T11:58
at 2008-05-16T11:58
bash script 無法做 cp

By Irma
at 2008-05-16T11:54
at 2008-05-16T11:54