您好,我正在 debian 10 上使用网络管理器创建基于 IPSEC vpn 连接的 L2TP。由于一个非常奇怪的原因,该进程在信号 15 上终止。我用以下命令建立连接:
nmcli con up office
配置文件/etc/NetworkManager/system-connections/office.nmconnection为:
[connection]
id=office
uuid=cf7498fb-01c9-44c1-91a9-789d6627950b
type=vpn
autoconnect=true
interface-name=--
permissions=
[vpn]
gateway=10.0.0.1
ipsec-enabled=yes
ipsec-psk=0sbWVuZWxhb3M3MTg=
mru=1400
mtu=1400
password-flags=0
ipsec-esp=3des-sha1
ipsec-ike=3des-sha1-modp1024!
#refuse-chap=yes
#refuse-mschap=yes
#refuse-pap=yes
#require-mppe=yes
user=raspberry1
service-type=org.freedesktop.NetworkManager.l2tp
[vpn-secrets]
password=...
[ipv4]
dns-search=
method=auto
never-default=true
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
在 /var/log/messages 中我可以看到连接以及错误
May 19 07:25:01 rpi4-20210210 NetworkManager[391]: <info> [1621409101.4139] agent-manager: req[0xffff98002ca0, :1.53/nmcli-connect/0]: agent registered
May 19 07:25:01 rpi4-20210210 NetworkManager[391]: <info> [1621409101.4195] audit: op="connection-activate" uuid="cf7498fb-01c9-44c1-91a9-789d6627950b" name="office" pid=1330 uid=0 result="success"
May 19 07:25:01 rpi4-20210210 NetworkManager[391]: <info> [1621409101.4277] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",0]: Started the VPN service, PID 1336
May 19 07:25:01 rpi4-20210210 NetworkManager[391]: <info> [1621409101.4445] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",0]: Saw the service appear; activating connection
May 19 07:25:01 rpi4-20210210 NetworkManager[391]: <info> [1621409101.4561] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",0]: VPN connection: (ConnectInteractive) reply received
May 19 07:25:01 rpi4-20210210 nm-l2tp-service[1336]: Check port 1701
May 19 07:25:04 rpi4-20210210 nm-l2tp-service[1336]: xl2tpd started with pid 1407
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.8892] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",0]: VPN plugin: state changed: starting (3)
May 19 07:25:04 rpi4-20210210 pppd[1408]: Plugin pppol2tp.so loaded.
May 19 07:25:04 rpi4-20210210 pppd[1408]: Plugin /usr/lib/pppd/2.4.7/nm-l2tp-pppd-plugin.so loaded.
May 19 07:25:04 rpi4-20210210 pppd[1408]: pppd 2.4.7 started by root, uid 0
May 19 07:25:04 rpi4-20210210 pppd[1408]: Using interface ppp0
May 19 07:25:04 rpi4-20210210 pppd[1408]: Connect: ppp0 <-->
May 19 07:25:04 rpi4-20210210 pppd[1408]: Overriding mtu 1500 to 1400
May 19 07:25:04 rpi4-20210210 pppd[1408]: Overriding mru 1500 to mtu value 1400
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9186] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/9)
May 19 07:25:04 rpi4-20210210 pppd[1408]: Overriding mtu 1450 to 1400
May 19 07:25:04 rpi4-20210210 pppd[1408]: CHAP authentication succeeded
May 19 07:25:04 rpi4-20210210 pppd[1408]: local IP address 10.1.1.10
May 19 07:25:04 rpi4-20210210 pppd[1408]: remote IP address 10.1.1.1
May 19 07:25:04 rpi4-20210210 pppd[1408]: primary DNS address 10.1.1.1
May 19 07:25:04 rpi4-20210210 pppd[1408]: secondary DNS address 1.1.1.1
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9512] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",0]: VPN connection: (IP4 Config Get) reply received from old-style plugin
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9524] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: VPN Gateway: 10.0.0.1
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9525] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Tunnel Device: "ppp0"
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9526] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: IPv4 configuration:
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9526] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Internal Address: 10.1.1.10
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9526] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Internal Prefix: 32
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9527] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Internal Point-to-Point Address: 10.1.1.1
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9527] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Static Route: 10.1.1.1/32 Next Hop: 0.0.0.0
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9527] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Internal DNS: 10.1.1.1
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9528] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: Internal DNS: 1.1.1.1
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9528] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: DNS Domain: '(none)'
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9528] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: Data: No IPv6 configuration
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9529] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: VPN plugin: state changed: started (4)
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9592] vpn-connection[0xaaaafdcd24d0,cf7498fb-01c9-44c1-91a9-789d6627950b,"office",9:(ppp0)]: VPN connection: (IP Config Get) complete
May 19 07:25:04 rpi4-20210210 NetworkManager[391]: <info> [1621409104.9596] device (ppp0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
May 19 07:25:05 rpi4-20210210 NetworkManager[391]: <info> [1621409105.0093] device (ppp0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'external')
May 19 07:26:35 rpi4-20210210 NetworkManager[391]: <info> [1621409195.9260] device (ppp0): state change: disconnected -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
May 19 07:26:35 rpi4-20210210 pppd[1408]: Terminating on signal 15
May 19 07:26:35 rpi4-20210210 pppd[1408]: Connect time 1.6 minutes.
May 19 07:26:35 rpi4-20210210 pppd[1408]: Sent 0 bytes, received 343296 bytes.
May 19 07:26:35 rpi4-20210210 pppd[1408]: Overriding mtu 1500 to 1400
May 19 07:26:35 rpi4-20210210 pppd[1408]: Overriding mru 1500 to mtu value 1400
连接时,它似乎运行良好,但是我无法诊断“状态更改:非托管 -> 不可用(原因'连接假设',sys-iface-state:'外部')”,这可能是导致的原因ppp客户端发送信号15来终止连接。
有什么线索吗?