Я выдохся и не могу найти решение.
Поднял L2TP сервер на mpd5:
Код: Выделить всё
startup:
set user mst pass
set console self 127.0.0.1 5005
set console open
set web self 192.168.4.1 5006
set web open
default:
load l2tp_server
l2tp_server:
# Define dynamic IP address pool.
set ippool add pool1 192.168.5.50 192.168.5.60
# Create clonable bundle template named B
create bundle template B
set iface enable proxy-arp
set iface idle 1800
set iface enable tcpmssfix
set ipcp yes vjcomp
# Specify IP address pool for dynamic assigment.
set ipcp ranges 192.168.5.1/24 ippool pool1
set ipcp dns 192.168.5.1
# The five lines below enable Microsoft Point-to-Point encryption
# (MPPE) using the ng_mppc(8) netgraph node type.
set bundle enable compression
set ccp yes mppc
set mppc yes e40
set mppc yes e128
set mppc yes stateless
# Create clonable link template named L
create link template L l2tp
# Set bundle template to use
set link action bundle B
# Multilink adds some overhead, but gives full 1500 MTU.
#set link enable multilink
set link yes acfcomp protocomp
set link no pap chap
set link enable chap
set link keep-alive 10 60
# We reducing link mtu to avoid GRE packet fragmentation
set link mtu 1460
# Configure l2tp
set l2tp self xxx.xxx.xxx.xxx
# Allow to accept calls
set link enable incoming
Код: Выделить всё
# tcpdump -i em1 -n | grep 77.217.174.46 (адрес шлюза мобильного оператора)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em1, link-type EN10MB (Ethernet), capture size 96 bytes
06:26:54.737981 IP 77.217.174.46.38438 > xxx.xxx.xxx.xxx.1701: l2tp:[TLS](0/0)Ns=0,Nr=0 *MSGTYPE(SCCRQ) *PROTO_VER(1.0) *HOST_NAME(anonymous) *FRAMING_CAP(AS) |...
06:26:54.738665 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/0)Ns=0,Nr=1 *MSGTYPE(SCCRP) *HOST_NAME(gw.td.si.local) |...
06:26:55.718203 IP 77.217.174.46.38438 > xxx.xxx.xxx.xxx.1701: l2tp:[TLS](63783/0)Ns=1,Nr=1 *MSGTYPE(SCCCN)
06:26:55.766331 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/0)Ns=1,Nr=2 ZLB
06:26:56.458156 IP 77.217.174.46.38438 > xxx.xxx.xxx.xxx.1701: l2tp:[TLS](63783/0)Ns=2,Nr=1 *MSGTYPE(ICRQ) *ASSND_SESS_ID(8401) *CALL_SER_NUM(3930832207)
06:26:56.458815 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/8401)Ns=1,Nr=3 *MSGTYPE(ICRP) *ASSND_SESS_ID(41748)
06:26:57.078259 IP 77.217.174.46.38438 > xxx.xxx.xxx.xxx.1701: l2tp:[TLS](63783/41748)Ns=3,Nr=2 *MSGTYPE(ICCN) *TX_CONN_SPEED(100000000) *FRAMING_TYPE(AS)
06:26:57.079062 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=0,Nr=0 {LCP, Conf-Request (0x01), id 1, length 25}
06:26:57.125827 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/0)Ns=2,Nr=4 ZLB
06:26:59.085513 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=1,Nr=0 {LCP, Conf-Request (0x01), id 2, length 25}
06:27:01.094822 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=2,Nr=0 {LCP, Conf-Request (0x01), id 3, length 25}
06:27:01.558186 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:01.577929 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:03.104050 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=3,Nr=0 {LCP, Conf-Request (0x01), id 4, length 25}
06:27:05.113343 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=4,Nr=0 {LCP, Conf-Request (0x01), id 5, length 25}
06:27:05.978017 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:05.997666 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:07.122768 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=5,Nr=0 {LCP, Conf-Request (0x01), id 6, length 25}
06:27:07.937755 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:09.131872 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=6,Nr=0 {LCP, Conf-Request (0x01), id 7, length 25}
06:27:09.958128 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:11.141174 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=7,Nr=0 {LCP, Conf-Request (0x01), id 8, length 25}
06:27:11.958092 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:13.150401 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=8,Nr=0 {LCP, Conf-Request (0x01), id 9, length 25}
06:27:13.978126 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:15.159677 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[S](20154/8401)Ns=9,Nr=0 {LCP, Conf-Request (0x01), id 10, length 25}
06:27:15.977922 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 73
06:27:17.169351 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/8401)Ns=2,Nr=4 *MSGTYPE(CDN) *ASSND_SESS_ID(41748) *RESULT_CODE(3/0)
06:27:17.998276 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 74
06:27:18.168167 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/8401)Ns=2,Nr=4 *MSGTYPE(CDN) *ASSND_SESS_ID(41748) *RESULT_CODE(3/0)
06:27:18.797979 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 74
06:27:20.167450 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/8401)Ns=2,Nr=4 *MSGTYPE(CDN) *ASSND_SESS_ID(41748) *RESULT_CODE(3/0)
06:27:22.738395 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 74
06:27:24.165987 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/8401)Ns=2,Nr=4 *MSGTYPE(CDN) *ASSND_SESS_ID(41748) *RESULT_CODE(3/0)
06:27:27.158516 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 74
06:27:32.163075 IP xxx.xxx.xxx.xxx.1701 > 77.217.174.46.38438: l2tp:[TLS](20154/8401)Ns=2,Nr=4 *MSGTYPE(CDN) *ASSND_SESS_ID(41748) *RESULT_CODE(3/0)
06:27:34.057815 IP 77.217.174.46 > xxx.xxx.xxx.xxx: ICMP 77.217.174.46 udp port 38438 unreachable, length 74
^C4985 packets captured
5009 packets received by filter
0 packets dropped by kernel