用Linux自身做一个L2TP的VPN服务器。
先安装了RHEL5,然后到http://www.xelerance.com/software/xl2tpd/上下载了xl2tpd-1.1.11.tar.gz,解压后,进入该解压目录,然后编译、安装:
make
make install
安装完毕后,修改相关的配置文件:
1、修改/etc/xl2tpd/xl2tpd.conf,内容如下:
[lns default]
ip range = 192.168.191.2-192.168.191.254
local ip = 192.168.191.1
require chap = yes
refuse pap = yes
require authentication = yes
name = l2tpvpnserver
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
2、修改/etc/ppp/options.xl2tpd,内容如下:
ipcp-accept-local
ipcp-accept-remote
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
3、修改/etc/ppp/chap-secrets,内容如下
myvpntest * myvpntest *