標題:
【OpenWRT】——PPTP Server
[打印本頁]
作者:
角色
時間:
2013-3-31 19:11
標題:
【OpenWRT】——PPTP Server
本帖最後由 角色 於 2013-11-17 22:27 編輯
1. Using putty to enable the OpenWRT system. The default router IP is "192.168.1.1".
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:~#
複製代碼
2. Run the following commands
opkg update
opkg install pptpd
opkg install kmod-mppe
/etc/init.d/pptpd enable
/etc/init.d/pptpd start
複製代碼
3. vi /etc/pptpd.conf
The default content
#debug
option /etc/ppp/options.pptpd
speed 115200
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
複製代碼
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
localip 192.168.1.1
remoteip 192.168.1.2-99
複製代碼
4. vi /etc/ppp/options.pptpd. The default settings are
#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
複製代碼
Replace the IP "172.16.1.1" by "192.168.1.1", the above settings become
#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
複製代碼
4. 设PPTP client login name and password (/etc/ppp/chap-secrets)
Format: username空格*空格password空格*
vi /etc/ppp/chap-secrets
#username * password *
john * john-password *
mary * mary-password *
複製代碼
5. Router firewall settings (/etc/firewall.user)
vi /etc/firewall.user
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
複製代碼
6. Reboot the router
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
作者:
角色
時間:
2013-3-31 23:29
本帖最後由 角色 於 2013-11-17 23:22 編輯
备用帖子
作者:
角色
時間:
2013-4-17 00:47
本帖最後由 角色 於 2013-11-17 23:22 編輯
备用帖子
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/)
Powered by Discuz! 7.2