作者Richie1105 ( )
看板Linux
标题Re: [问题] PPPoE Server的NAT设定
时间Fri May 16 20:54:03 2008
※ 引述《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,却无法以输入"网址"的方法连到外面网页
请问发生的原因有哪些呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.117.140.94
※ 编辑: Richie1105 来自: 59.117.140.94 (05/16 20:57)