Openvpn 구성 파일은 CLI에서는 작동하지만 네트워크 관리자에서는 작동하지 않습니다.

Openvpn 구성 파일은 CLI에서는 작동하지만 네트워크 관리자에서는 작동하지 않습니다.

다음을 사용하여 원격 VPS에 내 openvpn 서버를 설치했습니다.openvpn-install 유틸리티모든 기본 매개변수를 사용합니다.

출력 .ovpn 파일을 클라이언트 시스템에 다운로드한 후 CLI에서 openvpn 서버를 테스트했는데 제대로 작동합니다.

sudo openvpn vpnperso.ovpn

그런데 네트워크 관리자에서 이 파일을 가져오려고 하면 VPN 연결 시간이 초과됩니다.

클라이언트 측 로그:

$cat /var/log/syslog | grep vpn

juin 30 10:58:09 sainte-victoire NetworkManager[774]: <info>  [1561885089.8474] audit: op="connection-activate" uuid="1c4eaa3c-a511-4e0d-b115-ced19c047574" name="vpnperso" pid=1281 uid=1000 result="success"
juin 30 10:58:09 sainte-victoire NetworkManager[774]: <info>  [1561885089.8538] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: Started the VPN service, PID 31822
juin 30 10:58:09 sainte-victoire NetworkManager[774]: <info>  [1561885089.8634] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: Saw the service appear; activating connection
juin 30 10:58:09 sainte-victoire NetworkManager[774]: <info>  [1561885089.8698] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: VPN plugin: state changed: starting (3)
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: WARNING: file '/home/luc/.local/share/networkmanagement/certificates/vpnperso/private.key' is group or others accessible
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.08
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: TCP/UDP: Preserving recently used remote address: [AF_INET]ip.ip.ip.ip:1194
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: UDP link local: (not bound)
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: UDP link remote: [AF_INET]ip.ip.ip.ip:1194
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
juin 30 10:58:09 sainte-victoire nm-openvpn[31825]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
juin 30 10:59:09 sainte-victoire NetworkManager[774]: <warn>  [1561885149.6776] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: VPN connection: connect timeout exceeded.
juin 30 10:59:09 sainte-victoire nm-openvpn-serv[31822]: Connect timer expired, disconnecting.
juin 30 10:59:09 sainte-victoire nm-openvpn[31825]: TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
juin 30 10:59:09 sainte-victoire nm-openvpn[31825]: TLS Error: TLS handshake failed
juin 30 10:59:09 sainte-victoire nm-openvpn[31825]: SIGTERM[hard,tls-error] received, process exiting
juin 30 10:59:09 sainte-victoire NetworkManager[774]: <warn>  [1561885149.6875] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: VPN plugin: failed: connect-failed (1)
juin 30 10:59:09 sainte-victoire NetworkManager[774]: <info>  [1561885149.6884] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: VPN plugin: state changed: stopping (5)
juin 30 10:59:09 sainte-victoire NetworkManager[774]: <info>  [1561885149.6892] vpn-connection[0x562bf20367c0,1c4eaa3c-a511-4e0d-b115-ced19c047574,"vpnperso",0]: VPN plugin: state changed: stopped (6)

서버 측 로그

$cat /var/log/syslog | grep vpn

Jun 30 10:59:09 vps704584 ovpn-server[12227]: TLS Error: tls-crypt unwrapping failed from [AF_INET]ip:ip:ip:ip:53903
Jun 30 10:59:09 vps704584 ovpn-server[12227]: tls-crypt unwrap error: packet too short

NetworkManager를 작동시키려면 어떻게 해야 합니까?

답변1

문제는 NetworkManager가 현재 tls-cryptopenvpn 버전 2.4+의 기능을 지원하지 않는다는 것입니다.

https://github.com/angristan/openvpn-install/issues/312

기본적으로,openvpn 설치설치 중에 활성화된 최상의 보안 설정을 적용합니다 tls-crypt. networkmanager가 openvpn 서버와 작동하도록 하려면 서버에 openvpn을 설치할 때 이 기능을 비활성화해야 합니다. 동일한 openvpn-install.sh스크립트를 사용하여 openvpn을 제거한 다음 다시 설치하고 설치 절차 중에 암호화에 대한 사용자 정의 설정을 사용할 수 있습니다. 어느 시점에서 tls-auth또는 를 사용하라는 메시지가 표시되면 tls-crypt을 선택하세요 tls-auth.

TLS-auth와 TLS-crypt의 차이점

관련 정보