ubuntu18.04上进行l2tp拨号,ppp协商阶段失败
基本配置可以参考以下连接
https://blog.csdn.net/ypbsyy/article/details/85265079
但是配置完拨号的时候到ppp阶段就失败,抓包发现是客户端ppp阶段一开始就失败,说明是pppd进程启动失败,这个时候查看/var/log/syslog里边可以查看为什么pppd启动失败,提示是testvpn.l2tpd文件中lock项pppd无法识别,无法解析配置文件,所以把配置文件中这一行删掉,删掉后,l2tp拨号成功
xl2tpd_test.conf文件内容如下:
[lac testvpn] ; Our fallthrough LNS definition
name = myuser
lns = 192.168.10.10
ppp debug = yes ; * Turn on PPP debugging
pppoptfile = /etc/xl2tpd/test.l2tpd ; * ppp options file
challenge = no ; * Challenge authenticate peer ;
test.l2tpd内容如下:
ipcp-accept-local
ipcp-accept-remote
refuse-eap
require-mschap-v2
noccp
noauth
mtu 1410
mru 1410
usepeerdns
debug
lock
connect-delay 1000
name server11
password 123456
unit 10
4、启动xl2tp进程
killall xl2tpd
xl2tpd -c /etc/xl2tpd/xl2tpd_test.conf
5、拨号
echo ‘c testvpn’ > /var/run/xl2tpd/l2tp-control