Поднимаю xl2tpd на CentOS6, который в свою очередь xen-вируталка.
При попытке подключения с mikrotik:
# xl2tpd -D
xl2tpd[3196]: setsockopt recvref[30]: Protocol not available
xl2tpd[3196]: Using l2tp kernel support.
xl2tpd[3196]: xl2tpd version xl2tpd-1.3.6 started on centos PID:3196
xl2tpd[3196]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
xl2tpd[3196]: Forked by Scott Balmos and David Stipp, (C) 2001
xl2tpd[3196]: Inherited by Jeff McAdams, (C) 2002
xl2tpd[3196]: Forked again by Xelerance (www.xelerance.com) (C) 2006
xl2tpd[3196]: Listening on IP address 0.0.0.0, port 1701
xl2tpd[3196]: Connection established to X.X.X.X, 1701. Local: 6526, Remote: 64349 (ref=0/0). LNS session is 'default'
xl2tpd[3196]: Call established with X.X.X.X, Local: 44517, Remote: 1, Serial: 123
xl2tpd[3196]: result_code_avp: avp is incorrect size. 8 < 10
xl2tpd[3196]: handle_avps: Bad exit status handling attribute 1 (Result Code) on mandatory packet.
xl2tpd[3196]: call_close: Call 44517 to X.X.X.X disconnected
xl2tpd[3196]: child_handler : pppd exited for call 1 with code 11
xl2tpd[3196]: Call established with X.X.X.X, Local: 27020, Remote: 2, Serial: 124
xl2tpd[3196]: result_code_avp: avp is incorrect size. 8 < 10
xl2tpd[3196]: handle_avps: Bad exit status handling attribute 1 (Result Code) on mandatory packet.
xl2tpd[3196]: call_close: Call 27020 to X.X.X.X disconnected
xl2tpd[3196]: child_handler : pppd exited for call 2 with code 11
xl2tpd[3196]: result_code_avp: avp is incorrect size. 8 < 10
xl2tpd[3196]: handle_avps: Bad exit status handling attribute 1 (Result Code) on mandatory packet.
xl2tpd[3196]: Connection 64349 closed to X.X.X.X, port 1701 (Result Code: expected at least 10, got 8)
xl2tpd[3196]: Connection established to X.X.X.X, 1701. Local: 63289, Remote: 64350 (ref=0/0). LNS session is 'default'
xl2tpd[3196]: Call established with X.X.X.X, Local: 3683, Remote: 1, Serial: 125
xl2tpd[3196]: result_code_avp: avp is incorrect size. 8 < 10
xl2tpd[3196]: handle_avps: Bad exit status handling attribute 1 (Result Code) on mandatory packet.
xl2tpd[3196]: call_close: Call 3683 to X.X.X.X disconnected
Конфиги:
# cat /etc/xl2tpd/xl2tpd.conf
[global]
port = 1701
[lns default]
ip range = 10.10.10.10-10.10.10.20
local ip = 10.10.10.1
refuse chap = yes
refuse pap = yes
require authentication = yes
name = vpn-gw
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
# cat /etc/ppp/options.xl2tpd
unit 0
require-mschap-v2
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
mtu 1400
mru 1400
logfile /var/log/ppp/ppp.log
# cat /etc/ppp/chap-secrets
user1 vpn-gw "D73kas2380" 10.10.10.11
user2 vpn-gw "S934lq129d" 10.10.10.12
на клиенте:
/interface l2tp-client
add connect-to=Y.Y.Y.Y mrru=1600 name=tun0-gw password=S934lq129d user=user2
P.S. в ppp.log peer user2 CHAP Authentication failed, ушел копать в этом направлении... P.P.S. С noauth авторизация проходит.