OpenVPN trabalhando a partir da CLI, mas não via a GUI do NetworkManager

2

Eu tenho uma conexão VPN funcionando via CLI:

sudo openvpn myconfigfile.ovpn

Eu importei o arquivo na GUI do Network Manager e quando tento usá-lo, ele sempre falha, mas não consigo encontrar o motivo. Eu dei uma olhada nos logs do NetworkManager via:

journalctl -u NetworkManager 

e dá isto:

sept. 06 09:30:56 alt-machine NetworkManager[19942]: <info>  [1504683056.7617] audit: op="connection-activate" uuid="24fc3644-b324-46a4-9ce1-c1a0fcea1b75" name="name-of-connection" pid=3406 uid=1000 result="success"
sept. 06 09:30:56 alt-machine NetworkManager[19942]: <info>  [1504683056.7900] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: Started the VPN service, PID 23791
sept. 06 09:30:56 alt-machine NetworkManager[19942]: <info>  [1504683056.8118] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: Saw the service appear; activating connection
sept. 06 09:30:56 alt-machine nm-openvpn[23798]: OpenVPN 2.4.0 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jun 22 2017
sept. 06 09:30:56 alt-machine nm-openvpn[23798]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
sept. 06 09:30:56 alt-machine NetworkManager[19942]: <info>  [1504683056.9251] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: VPN plugin: state changed: starting (3)
sept. 06 09:30:56 alt-machine NetworkManager[19942]: <info>  [1504683056.9251] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: VPN connection: (ConnectInteractive) reply received
sept. 06 09:30:57 alt-machine nm-openvpn[23798]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
sept. 06 09:30:57 alt-machine nm-openvpn[23798]: TCP/UDP: Preserving recently used remote address: [AF_INET]x.x.x.x:port
sept. 06 09:30:57 alt-machine nm-openvpn[23798]: UDP link local: (not bound)
sept. 06 09:30:57 alt-machine nm-openvpn[23798]: UDP link remote: [AF_INET]x.x.x.x:port
sept. 06 09:30:57 alt-machine nm-openvpn[23798]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
sept. 06 09:30:57 alt-machine nm-openvpn[23798]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
sept. 06 09:31:56 alt-machine NetworkManager[19942]: <warn>  [1504683116.7116] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: VPN connection: connect timeout exceeded.
sept. 06 09:31:56 alt-machine nm-openvpn-serv[23791]: Connect timer expired, disconnecting.
sept. 06 09:31:56 alt-machine NetworkManager[19942]: <warn>  [1504683116.7199] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: VPN plugin: failed: connect-failed (1)
sept. 06 09:31:56 alt-machine NetworkManager[19942]: <info>  [1504683116.7208] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: VPN plugin: state changed: stopping (5)
sept. 06 09:31:56 alt-machine NetworkManager[19942]: <info>  [1504683116.7210] vpn-connection[0x55e876784720,24fc3644-b324-46a4-9ce1-c1a0fcea1b75,"name-of-connection",0]: VPN plugin: state changed: stopped (6)

Existem outros registros onde posso dar uma olhada?

    
por Anthony Richir 06.09.2017 / 09:43

1 resposta

0

Altere o nível de log do NetworkManager para verificar o que está acontecendo no syslog:

Terminal:

sudo NetworkManager --log-level=DEBUG
sudo tail -f /var/log/syslog

Tente conectar a VPN novamente pela NetworkManger e procure por mensagens sobre nm-openvpn no syslog. No meu caso, era um espaço de letras no meu caminho para o arquivo .crt:

nm-openvpn[1957]: Options error: --ca fails with '/home/user/IPVanish%20config/ca.ipvanish.com.crt': No such file or directory (errno=2)

Então, resolvi o problema excluindo espaços de letras neste caminho para meus arquivos de configuração.

Mais: link

Redefina o nível de registro para INFO depois.

    
por Uwe 12.08.2018 / 23:45