1、安装PPTP
opkg update
opkg install kmod-mppe
opkg install pptpd
2、/etc/pptpd.conf
option /etc/ppp/options.pptpd
connections 50
localip 192.168.123.200
remoteip 192.168.123.201-254
speed 1152000
stimeout 10
3、/etc/ppp/options.pptpd增加以下两行
ms-dns 192.168.123.1
ms-wins 192.168.123.1
4、/etc/ppp/chap-secrets,添加用户名和密码,格式:用户名+空格+*+空格+密码+空格+*
a1 * 123456 *
a2 * 123456 *
a3 * 123456 *
5、在防火墙中允许1723和47端口
config rule
option target 'ACCEPT'
option _name 'pptp'
option src 'wan'
option proto 'tcp'
option dest_port '1723'
config rule
option target 'ACCEPT'
option _name 'gre'
option src 'wan'
option proto '47'
6、修改firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT' * 允许转发
7、/etc/init.d/pptpd
注释以下行
# config_foreach setup_login login
# ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
因为在/etc/pptpd.conf中指定了localip和remoteip,没必要再去读/etc/config/pptpd里面的内容了,注释掉以下三行
# [ -n "$localip" ] && echo "localip $localip" >> $CONFIG
# [ -n "$remoteip" ] && echo "remoteip $remoteip" >> $CONFIG
# [ "$logwtmp" -eq 1 ] && echo "logwtmp" >> $CONFIG
[ "$enabled" -eq 0 ] && return 1
8、单独编译
make package/feeds/packages/pptpd/compile V=99