ubuntu 16.04 xl2tpd в качестве сервака
клиенты отваливаются каждые Х минут.
ipsec.conf:
conn NAT-2-NAT
forceencaps=yes
authby=secret
pfs=no
rekey=yes
keyingtries=6
ikelifetime=2h
salifetime=8h
type=tunnel
left=192.168.18.1
leftsubnet=192.168.18.0/24
leftnexthop=%defaultroute
leftprotoport=17/1701
right=%any
rightsubnet=vhost:%priv,%no
rightprotoport=17/0
dpddelay=10
dpdtimeout=90
dpdaction=clear
auto=add
xl2ptd.conf:
[global]
ipsec saref = no
listen-addr = xx.xx.xx.xx
[lns default]
ip range = 192.168.18.2-192.168.18.254
local ip = 192.168.18.1
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
refuse chap = yes
refuse pap = yes
options.xl2pd
refuse-pap
refuse-chap
refuse-mschap
# Выставляем dns
ms-dns 8.8.8.8
ms-dns 8.8.4.4
asyncmap 0
auth
crtscts
idle 1800
mtu 1200
mru 1200
lock
hide-password
local
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
debug
logfile /var/log/xl2tpd.log
ну и собственно сам syslog:
Mar 22 13:19:28 vpn1 pppd[322]: sent [LCP EchoRep id=0x6 magic=0x3f3c2307]
Mar 22 13:19:28 vpn1 pppd[322]: sent [LCP EchoReq id=0x6 magic=0x3f3c2307]
Mar 22 13:19:29 vpn1 pppd[322]: rcvd [LCP EchoRep id=0x6 magic=0x38e63b0]
Mar 22 13:19:58 vpn1 pppd[322]: sent [LCP EchoReq id=0x7 magic=0x3f3c2307]
Mar 22 13:19:58 vpn1 pppd[322]: rcvd [LCP EchoReq id=0x7 magic=0x38e63b0]
Mar 22 13:19:58 vpn1 pppd[322]: sent [LCP EchoRep id=0x7 magic=0x3f3c2307]
Mar 22 13:19:59 vpn1 pppd[322]: rcvd [LCP EchoRep id=0x7 magic=0x38e63b0]
Mar 22 13:20:28 vpn1 pppd[322]: rcvd [LCP EchoReq id=0x8 magic=0x38e63b0]
Mar 22 13:20:28 vpn1 pppd[322]: sent [LCP EchoRep id=0x8 magic=0x3f3c2307]
Mar 22 13:20:28 vpn1 pppd[322]: sent [LCP EchoReq id=0x8 magic=0x3f3c2307]
Mar 22 13:20:29 vpn1 pppd[322]: rcvd [LCP EchoRep id=0x8 magic=0x38e63b0]
Mar 22 13:20:58 vpn1 pppd[322]: rcvd [LCP EchoReq id=0x9 magic=0x38e63b0]
Mar 22 13:20:58 vpn1 pppd[322]: sent [LCP EchoRep id=0x9 magic=0x3f3c2307]
Mar 22 13:20:58 vpn1 pppd[322]: sent [LCP EchoReq id=0x9 magic=0x3f3c2307]
Mar 22 13:20:59 vpn1 pppd[322]: rcvd [LCP EchoRep id=0x9 magic=0x38e63b0]
Mar 22 13:21:26 vpn1 xl2tpd[31800]: check_control: Received out of order control packet on tunnel 46141 (got 7, expected 8)
Mar 22 13:21:26 vpn1 xl2tpd[31800]: handle_packet: bad control packet!
Mar 22 13:21:27 vpn1 xl2tpd[31800]: check_control: Received out of order control packet on tunnel 46141 (got 7, expected 8)
Mar 22 13:21:27 vpn1 xl2tpd[31800]: handle_packet: bad control packet!
Mar 22 13:21:28 vpn1 xl2tpd[31800]: check_control: Received out of order control packet on tunnel 46141 (got 7, expected 8)
Mar 22 13:21:28 vpn1 xl2tpd[31800]: handle_packet: bad control packet!
Mar 22 13:21:28 vpn1 pppd[322]: rcvd [LCP EchoReq id=0xa magic=0x38e63b0]
Mar 22 13:21:28 vpn1 pppd[322]: sent [LCP EchoRep id=0xa magic=0x3f3c2307]
Mar 22 13:21:28 vpn1 pppd[322]: sent [LCP EchoReq id=0xa magic=0x3f3c2307]
Mar 22 13:21:29 vpn1 pppd[322]: rcvd [LCP EchoRep id=0xa magic=0x38e63b0]
Mar 22 13:21:29 vpn1 xl2tpd[31800]: check_control: Received out of order control packet on tunnel 46141 (got 7, expected 8)
Mar 22 13:21:29 vpn1 xl2tpd[31800]: handle_packet: bad control packet!
Mar 22 13:21:30 vpn1 xl2tpd[31800]: Maximum retries exceeded for tunnel 24346. Closing.
Mar 22 13:21:30 vpn1 pppd[322]: Modem hangup
Mar 22 13:21:30 vpn1 pppd[322]: Connect time 5.1 minutes.
Mar 22 13:21:30 vpn1 pppd[322]: Sent 153979 bytes, received 217936 bytes.
Mar 22 13:21:30 vpn1 xl2tpd[31800]: Terminating pppd: sending TERM signal to pid 322
Mar 22 13:21:30 vpn1 xl2tpd[31800]: Connection 46141 closed to xx.xx.xx.xx, port 33073 (Timeout)
Mar 22 13:21:30 vpn1 pppd[322]: Script /etc/ppp/ip-down started (pid 430)
Mar 22 13:21:30 vpn1 pppd[322]: Connection terminated.
Mar 22 13:21:30 vpn1 pppd[322]: Waiting for 1 child processes...
Mar 22 13:21:30 vpn1 pppd[322]: script /etc/ppp/ip-down, pid 430
Mar 22 13:21:30 vpn1 pppd[322]: Terminating on signal 15
Mar 22 13:21:30 vpn1 pppd[322]: sending SIGTERM to process 430
Mar 22 13:21:30 vpn1 pppd[322]: Exit.
Mar 22 13:21:30 vpn1 xl2tpd[31800]: Can not find tunnel 24346 (refhim=0)
Mar 22 13:21:30 vpn1 xl2tpd[31800]: network_thread: unable to find call or tunnel to handle packet. call = 1892, tunnel = 24346 Dumping.
уже гугл сломал своими поисками :)