作者xexxo2002 (xexxo2002)
看板Linux
标题Re: [问题] PPPoE Server的NAT设定
时间Fri May 16 00:26:56 2008
※ 引述《Richie1105 ( )》之铭言:
: http://o.0.photo.xuite.net/f/1/7/4/richie1105/2519747/93081633.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
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.216.50
1F:推 Richie1105:谢谢你,依照您的设定,已可成功对外连线 05/16 20:40