電訊茶室's Archiver

角色 發表於 2013-11-16 20:12

【OpenWRT】—— PPTP client traffic routed to remote gateway

[i=s] 本帖最後由 角色 於 2014-2-3 17:20 編輯 [/i]

The following pictures illustrate the instruction methods of PPTP Client on OpenWRT machine and the local traffic will be routed to the remote gateway of the remote VPN server. In the following example, OpenWRT 12.09 is used.

1. Click [System]->[Software]. Before the installation of any packages, update the package list of OpenWRT
[attach]2952[/attach]

2. Install the package "ppp-mod-pptp"
[attach]2941[/attach]

3. Wait for a moment, it gives the following screen
[attach]2942[/attach]

4. Check installed packages which includes "ppp-mod-ppp"
[attach]2943[/attach]

5. Click [Network]->[Interface]. Go to the bottom and click "Add new interface"
[attach]2944[/attach]

6. Enter "vpn" in the field "Name of the new interface" and select "PPtP" in field "Protocol of the new interface". Press "Submit" to proceed to the next screen in 7.
[attach]2945[/attach]

7. Enter <VPN server name or ip> in the field "VPN Server". Enter <VPN user name> in the field "PAP/CHAP username". Enter <VPN password> in the field "PAP/CHAP password". Press "Save & Apply" to proceed.
[attach]2954[/attach]

8. Click "Advanced Settings" and note the check of "Bring up on boot". If it is changed, then press "Save & Apply" to proceed.
[attach]2947[/attach]

9. Click "Firewall Settings" and change the "Create/Assign firewall-zone" to "WAN". Press "Save & Apply" to proceed.
[attach]2948[/attach]

10. Choose [Network]->[Firewall]->[General Settings], check "vpn" added to the WAN. (You do not need to change everything).
[attach]2949[/attach]


11 Go to [Network]->[Interfaces] and check whether you have the following the screen
[attach]2950[/attach]

12. Reboot the router to make the PPTP client work for you
[attach]2951[/attach]


References:
【1】[url]http://wiki.openwrt.org/doc/howto/vpn.client.pptp[/url]
【2】[url]http://www.openwrt.org.cn/bbs/archiver/?tid-1480.html[/url]
【3】[url]http://www.hkepc.com/forum/viewthread.php?tid=1697252[/url]

角色 發表於 2013-11-16 20:30

[i=s] 本帖最後由 角色 於 2013-11-17 14:26 編輯 [/i]

If you know how to ssh the OpenWRT router, you could install the PPTP Client more easily.

1. opkg update

2. opkg install ppp-mod-pptp

3. Edit /etc/config/network and add

config 'interface' 'vpn'
        option 'proto'     'pptp'
        option 'ifname'    'vpn'
        option 'username'  'vpnuser'
        option 'password'  'vpnpass'
        option 'server'    'vpn.example.org'

4. Additionally the "wan" firewall zone must include both interfaces in /etc/config/firewall:

config 'zone'
        option 'name'      'wan'
        option 'network'   'wan vpn'
        option 'input'     'REJECT'
        option 'forward'   'REJECT'
        option 'output'    'ACCEPT'
        option 'masq'      '1'

角色 發表於 2013-11-17 14:33

Note the following settings.

If you want the OpenWRT router to connect the remote VPN server router, then you have to put a tick at Step 8 of the first post. If you do not wnat, uncheck it.

General operations:

1. If you want to disconnect the VPN, then press "Stop" buttong in Step 11 of the first post. You have to stop the "WAN" port as well. After a few seconds, you can connect the Internet by pressing "Connect" button as again.

Skypeus 發表於 2013-11-17 20:32

看了师兄写的安装设置步骤,很详细啊!:D

我的OpenWRT路由器上的设置师兄上面所示设置是一样的。

就是这样的设置,使用时还是会受到G*F*W的某些干扰?打开有些网址会被连接重置。

角色 發表於 2013-11-19 01:36

原来10.03.1的版本的ppp-mod-pptp有error!:L

角色 發表於 2014-6-15 15:12

OpenWRT PPTP VPN Client有问题,如果连接RouterOS的PPTP VPN Server是没有问题的,但是一连一般的PPTP VPN Server就出问题。

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.