我尝试使用 lt2p vpn 创建连接
但我的连接没有启动
[root@vps10337 system-connections]# nmcli connection add connection.id VPN_2 type vpn vpn-type l2tp connection.interface-name wlp2s0 ipv4.method auto vpn.data "gateway=xxx.xxx.xxx.xxx,ipsec-enabled= yes,ipsec-psk= 0s"$(base64 <<<'[PSK]' | rev | cut -c2- | rev)"=, mru = 1400, mtu = 1400, user=vpn, password-flags = 0, service-type=org.freedesktop.NetworkManager.l2tp , refuse-chap = yes, refuse-mschap = yes, refuse-pap = yes, require-mppe = yes, user=vpnuser " vpn.secrets password=vpnpass
Connection 'VPN_2' (41de6cab-be8b-41f8-8c8e-86b1d057a477) successfully added.
[root@vps10337 system-connections]#
[root@vps10337 system-connections]# nmcli c up VPN_2
Error: Connection activation failed: The VPN service failed to start
答案1
我遇到了同样的问题,问题是密码:
nmcli connection add connection.id VPNNAME1 connection.permissions user:root \
type vpn vpn-type l2tp ipv4.method auto \
vpn.data "gateway=XXX.XXX.XXX.XXX,ipsec-enabled= yes,ipsec-psk=0s"$(base64 <<<'YOURIPSECPSK' | rev | cut -c5- | rev)", mru = 1400, mtu = 1400, user=vpn, password-flags = 0, service-type=org.freedesktop.NetworkManager.l2tp , refuse-chap = yes, refuse-mschap = yes, refuse-pap = yes, require-mppe = no,requiere.mschap2=yes, requiere.eap=yes, user=adminvpn", vpn.secrets password="YOURPASSWORD"