명령줄을 사용하는 centos 7 nmcli l2tp vpn

명령줄을 사용하는 centos 7 nmcli l2tp vpn

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"

관련 정보