openwrt使用pptp客户端如何让lan口的用户都走vpn通道?

2013-09-05 10:47:41 +08:00
 jacy
我想让openwrt的路由器帮我pptp拨号,然后所有路由器的用户都走vpn通道,按照官方wiki设置后不能正常工作(无法访问任何外网)。

已经添加了一个vpn接口,ifconfig后主要的Interface:
br-lan Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21e:40ff:fe30:84d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6248 errors:0 dropped:0 overruns:0 frame:0
TX packets:1701 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:438624 (428.3 KiB) TX bytes:480666 (469.4 KiB)

pptp-vpn Link encap:Point-to-Point Protocol
inet addr:192.168.0.200 P-t-P:192.168.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1452 Metric:1
RX packets:51 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1710 (1.6 KiB) TX bytes:4905 (4.7 KiB)

eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:x.x.x.18 Bcast:49.209.5.255 Mask:255.255.254.0
inet6 addr: fe80::21e:40ff:fe30:84d6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68121 errors:0 dropped:0 overruns:0 frame:0
TX packets:70547 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7576449 (7.2 MiB) TX bytes:4316878 (4.1 MiB)
Interrupt:16

路由表:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 * 255.255.255.255 UH 0 0 0 pptp-vpn
192.168.1.0 * 255.255.255.0 U 0 0 0 br-lan
x.x.x.0 * 255.255.254.0 U 0 0 0 eth0
default x.x.x.1 0.0.0.0 UG 0 0 0 eth0

(出于隐私上面eth0即wan口的ip前三段用x.x.x表示了)

按照上面是没有走pptp通道,现在怎样让所有lan口的客户机走pptp通道,当然连接路由器要能连接上。
9501 次点击
所在节点    Linux
3 条回复
lbright
2013-09-05 18:51:41 +08:00
jacy
2013-09-06 00:34:14 +08:00
@lbright 不需要只能翻,只需所有流量走vpn
lbright
2013-09-06 13:39:19 +08:00
只是给你参考而已

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/81388

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX