【OpenWRT】——PPTP Server
[i=s] 本帖最後由 角色 於 2013-11-17 22:27 編輯 [/i]1. Using putty to enable the OpenWRT system. The default router IP is "192.168.1.1".[code]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:~#
[/code]2. Run the following commands[code]
opkg update
opkg install pptpd
opkg install kmod-mppe
/etc/init.d/pptpd enable
/etc/init.d/pptpd start
[/code]3. vi /etc/pptpd.conf
The default content[code]
#debug
option /etc/ppp/options.pptpd
speed 115200
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
[/code]Add the scripts after the end of the above code[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
[/code]4. vi /etc/ppp/options.pptpd. The default settings are[code]
#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
[/code]Replace the IP "172.16.1.1" by "192.168.1.1", the above settings become[code]
#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
[/code]4. 设PPTP client login name and password (/etc/ppp/chap-secrets)
Format: username空格*空格password空格*
vi /etc/ppp/chap-secrets[code]
#username * password *
john * john-password *
mary * mary-password *
[/code]5. Router firewall settings (/etc/firewall.user)
vi /etc/firewall.user[code]
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
[/code]6. Reboot the router
2013-4-14
之前的成功例子:[url]http://www.telecom-cafe.com/forum/viewthread.php?tid=5024&highlight=openwrt%2Bpptp[/url]
【1】[url]http://wiki.openwrt.org/doc/howto/vpn.server.pptpd[/url]
【2】[url]http://www.openwrt.org.cn/bbs/forum.php?mod=viewthread&tid=1081[/url] [i=s] 本帖最後由 角色 於 2013-11-17 23:22 編輯 [/i]
备用帖子 [i=s] 本帖最後由 角色 於 2013-11-17 23:22 編輯 [/i]
备用帖子
頁:
[1]