Estou tentando fazer com que minha conexão openvpn funcione. Eu uso uma chave estática deste tutorial: link
Quando me conecto via terminal sudo openvpn --config client.conf
está funcionando e recebo o ip da vpn.
Mas quando tento conectar via NetworkManager, recebo erros.
Meu sys.log da Mint (Sylvia):
NetworkManager[1173]: <info> [1532734780.1004] keyfile: update /etc/NetworkManager/system-connections/Contabo (4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo")
NetworkManager[1173]: <info> [1532734780.1011] audit: op="connection-update" uuid="4233221d-dbad-4b96-ba52-82d48ad0fdbf" name="Contabo" pid=26240 uid=1000 result="success"
NetworkManager[1173]: <info> [1532734804.6619] audit: op="connection-activate" uuid="4233221d-dbad-4b96-ba52-82d48ad0fdbf" name="Contabo" pid=18227 uid=1000 result="success"
NetworkManager[1173]: <info> [1532734804.6705] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",0]: Started the VPN service, PID 26304
NetworkManager[1173]: <info> [1532734804.6833] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",0]: Saw the service appear; activating connection
NetworkManager[1173]: nm-openvpn-Message: openvpn[26309] started
NetworkManager[1173]: <info> [1532734804.7085] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",0]: VPN plugin: state changed: starting (3)
NetworkManager[1173]: <info> [1532734804.7089] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",0]: VPN connection: (ConnectInteractive) reply received
nm-openvpn[26309]: OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
nm-openvpn[26309]: library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
nm-openvpn[26309]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
nm-openvpn[26309]: WARNING: file '/mnt/6865c96b-1d23-4ba3-80cc-bb8ebe7ac853/Ovpn/static.key' is group or others accessible
nm-openvpn[26309]: TUN/TAP device tun0 opened
nm-openvpn[26309]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --bus-name org.freedesktop.NetworkManager.openvpn.Connection_53 --tun -- tun0 1500 1560 10.8.0.2 10.8.0.1 init
NetworkManager[1173]: <info> [1532734804.7194] manager: (tun0): new Tun device (/org/freedesktop/NetworkManager/Devices/53)
NetworkManager[1173]: <info> [1532734804.7339] devices added (path: /sys/devices/virtual/net/tun0, iface: tun0)
NetworkManager[1173]: <info> [1532734804.7339] device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found.
NetworkManager[1173]: <info> [1532734804.7560] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",0]: VPN connection: (IP Config Get) reply received.
NetworkManager[1173]: <info> [1532734804.7598] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN connection: (IP4 Config Get) reply received
NetworkManager[1173]: <info> [1532734804.7608] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: VPN Gateway: my_server
NetworkManager[1173]: <info> [1532734804.7612] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: Tunnel Device: "tun0"
NetworkManager[1173]: <info> [1532734804.7615] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: IPv4 configuration:
NetworkManager[1173]: <info> [1532734804.7615] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: Internal Address: 10.8.0.2
NetworkManager[1173]: <info> [1532734804.7615] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: Internal Prefix: 32
NetworkManager[1173]: <info> [1532734804.7615] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: Internal Point-to-Point Address: 10.8.0.1
NetworkManager[1173]: <info> [1532734804.7616] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: Maximum Segment Size (MSS): 0
NetworkManager[1173]: <info> [1532734804.7616] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: Forbid Default Route: yes
NetworkManager[1173]: <info> [1532734804.7616] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: DNS Domain: '(none)'
NetworkManager[1173]: <info> [1532734804.7616] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: Data: No IPv6 configuration
NetworkManager[1173]: <info> [1532734804.7616] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN plugin: state changed: started (4)
NetworkManager[1173]: <info> [1532734804.7659] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN connection: (IP Config Get) complete
NetworkManager[1173]: <info> [1532734804.7663] device (tun0): state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
nm-openvpn[26309]: chroot to '/var/lib/openvpn/chroot' and cd to '/' succeeded
nm-openvpn[26309]: GID set to nm-openvpn
nm-openvpn[26309]: UID set to nm-openvpn
nm-openvpn[26309]: UDPv4 link local: [undef]
nm-openvpn[26309]: UDPv4 link remote: [AF_INET]my_server:1194
nm-openvpn[26309]: RAND_bytes() failed
nm-openvpn[26309]: Assertion failed at crypto.c:1393 (rand_bytes (output, len))
nm-openvpn[26309]: Exiting due to fatal error
NetworkManager[1173]: <info> [1532734804.7804] devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
dbus[1121]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
systemd[1]: Starting Network Manager Script Dispatcher Service...
NetworkManager[1173]: (nm-openvpn-service:26304): nm-openvpn-WARNING **: openvpn[26309] exited with error code 1
dbus[1121]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
systemd[1]: Started Network Manager Script Dispatcher Service.
nm-dispatcher: req:1 'vpn-up' [tun0]: new request (1 scripts)
nm-dispatcher: req:1 'vpn-up' [tun0]: start running ordered scripts...
NetworkManager[1173]: <warn> [1532734804.8122] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN plugin: failed: connect-failed (1)
NetworkManager[1173]: <info> [1532734804.8123] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN plugin: state changed: stopping (5)
NetworkManager[1173]: <info> [1532734804.8123] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN plugin: state changed: stopped (6)
NetworkManager[1173]: <info> [1532734804.8132] vpn-connection[0x24a1230,4233221d-dbad-4b96-ba52-82d48ad0fdbf,"Contabo",54:(tun0)]: VPN plugin: state change reason: unknown (0)
NetworkManager[1173]: <error> [1532734804.8176] platform-linux: do-change-link[54]: failure changing link: failure 19 (Kein passendes Gerät gefunden)
nm-dispatcher: req:2 'vpn-down' [tun0]: new request (1 scripts)
NetworkManager[1173]: <warn> [1532734804.8414] device (tun0): failed to get TUN interface info while updating connection.
NetworkManager[1173]: <info> [1532734804.8463] device (tun0): state change: unavailable -> unmanaged (reason 'unmanaged') [20 10 3]
nm-dispatcher: req:2 'vpn-down' [tun0]: start running ordered scripts...
ntpdate[26374]: the NTP socket is in use, exiting
kernel: [22932.924166] [UFW BLOCK] IN=enp5s0f1 OUT= MAC=01:00:5e:00:00:01:5c:49:79:ce:17:7b:08:00 SRC=192.168.178.1 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0xC0 TTL=1 ID=35165 DF PROTO=2
server.conf:
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret static.key
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
user nobody
group nobody
daemon
cipher AES-256-CBC
client.conf:
remote openvpn.my_server.com
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key
redirect-gateway
dhcp-option DNS 8.8.8.8
dhcp-option DNS 8.8.4.4
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
route 192.168.4.0 255.255.255.0
cipher AES-256-CBC