系统: rhel6.2 x86_64  

过程:

1. rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

2. vi /etc/yum.repo.d/epel.repo  修改 https为 http

3. yum install yum install xl2tpd

4. 改配置文件

# vi /etc/xl2tpd/xl2tpd.conf

[lac test***]

name = xxx(***账号名)

lns = xx.xx.xx.xx(***服务器IP)

pppoptfile = /etc/ppp/peers/test***.l2tpd

ppp debug = yes

# vi /etc/ppp/peers/test***.l2tpd 

remotename test***

user "xxx" (***账号)

password "xxxx" (***密码)

unit 0

lock

nodeflate

nobsdcomp

noauth

persist

nopcomp

noaccomp

maxfail 5

debug

5. 启动xl2tpd

/etc/init.d/xl2tpd start

6. 拨号与停止

echo 'c test***' > /var/run/xl2tpd/l2tp-control

echo 'd test***' > /var/run/xl2tpd/l2tp-control

7. 日志

tail -f /var/log/message