Monday, July 09, 2012

OpenWRT and PPTP VPN


opkg update
opkg install pptpd
opkg install kmod-mppe

edit /etc/ppp/options.pptpd
====================
speed 115200
stimeout 10
localip 192.168.1.1
remoteip 192.168.1.200-230
====================


edit /etc/pptpd.conf
====================

lock
debug
name vpn1 #control the usrs allowed
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe
#require-mppe-128
ms-dns 192.168.1.1
proxyarp

====================



edit /etc/ppp.chap-secrets
for login and pw

/etc/config/firewall
======================

#modify
config 'defaults'
option 'syn_flood' '1'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'drop_invalid' '1'
option 'forward' 'ACCEPT'


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

#add

config 'rule'
option '_name' 'pptpvpn'
option 'src' 'wan'
option 'proto' 'tcpudp'
option 'dest_port' '1723'
option 'target' 'ACCEPT'


======================

/etc/init.d/pptpd start
/etc/init.d/pptpd stop
/etc/init.d/pptpd restart
killall pptp

No comments: