| 本帖最後由 角色 於 2013-11-17 22:27 編輯 
 1. Using putty to enable the OpenWRT system. The default router IP is "192.168.1.1".
 2. Run the following commands複製代碼login as: root
root@192.168.1.1's password:
BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (12.09, r36088)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:~#
3. vi /etc/pptpd.conf複製代碼opkg update
opkg install pptpd
opkg install kmod-mppe
/etc/init.d/pptpd enable
/etc/init.d/pptpd start
 The default content
 Add the scripts after the end of the above code複製代碼#debug
option /etc/ppp/options.pptpd
speed 115200
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
4. vi /etc/ppp/options.pptpd. The default settings are複製代碼#debug
option /etc/ppp/options.pptpd
speed 115200
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
localip 192.168.1.1
remoteip 192.168.1.2-99
Replace the IP "172.16.1.1" by "192.168.1.1", the above settings become複製代碼#debug
#logfile /tmp/pptp-server.log
172.16.1.1:
auth
name "pptp-server"
lcp-echo-failure 3
lcp-echo-interval 60
default-asyncmap
mtu 1482
mru 1482
nobsdcomp
nodeflate
#noproxyarp
#nomppc
mppe required,no40,no56,stateless
require-mschap-v2
refuse-chap
refuse-mschap
refuse-eap
refuse-pap
#ms-dns 172.16.1.1
#plugin radius.so
#radius-config-file /etc/radius.conf
4. 设PPTP client login name and password (/etc/ppp/chap-secrets)複製代碼#debug
#logfile /tmp/pptp-server.log
192.168.1.1:
auth
name "pptp-server"
lcp-echo-failure 3
lcp-echo-interval 60
default-asyncmap
mtu 1482
mru 1482
nobsdcomp
nodeflate
#noproxyarp
#nomppc
mppe required,no40,no56,stateless
require-mschap-v2
refuse-chap
refuse-mschap
refuse-eap
refuse-pap
ms-dns 192.168.1.1
#plugin radius.so
#radius-config-file /etc/radius.conf
 Format: username空格*空格password空格*
 
 vi /etc/ppp/chap-secrets
 5. Router firewall settings (/etc/firewall.user)複製代碼#username * password *
john * john-password *
mary * mary-password *
 vi /etc/firewall.user
 6. Reboot the router複製代碼iptables -A input_wan -p tcp --dport 1723 -j ACCEPT
iptables -A input_wan -p gre -j ACCEPT
iptables -A input_rule -i ppp+ -j ACCEPT
iptables -A forwarding_rule -i ppp+ -j ACCEPT
iptables -A forwarding_rule -o ppp+ -j ACCEPT
iptables -A output_rule -o ppp+ -j ACCEPT
 
 2013-4-14
 之前的成功例子:http://www.telecom-cafe.com/foru ... ight=openwrt%2Bpptp
 
 【1】http://wiki.openwrt.org/doc/howto/vpn.server.pptpd
 【2】http://www.openwrt.org.cn/bbs/fo ... thread&tid=1081
 |