I'm trying to use a .ovpn file on the built-in VPN settings in Ubuntu 23.10
I go to the setting menu --> Network --> '+' button next to VPN
I click "Import from file..." and navigate to my .ovpn file.
It seems to work but never connects. On a Windows VM on the same machine, I use the OpenVPN client and the SAME file and it works just fine, so it's not the file configuration.
Do I need to do anything in the Advanced settings to get it to work? The other ovpn posts on here seem old and don't relate to modern versions of Ubuntu. I have also tried using the CLI command nmcli connection import type openvpn file <.opvn file>
which again imports it correctly but doesn't connect (same behaviour as the GUI).
In syslog, I get nm-openvpn[22624]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=5,code=113)
but as I said, It works from the same machine on my VM.
UFW is not enabled so the port is open.
Update:
I switched to port 1193 to try and using nc, I can see that 1193 is listening:
~$ nc -v -u -z -w 3 <myIP> 1193
Connection to <myIP> 1193 port [udp/*] succeeded!
Output of journal:
Jan 29 16:46:49 markswift3 nm-openvpn[6429]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Jan 29 16:46:49 markswift3 nm-openvpn[6429]: TCP/UDP: Preserving recently used remote address: [AF_INET]<myIP>:1193
Jan 29 16:46:49 markswift3 nm-openvpn[6429]: UDPv4 link local: (not bound)
Jan 29 16:46:49 markswift3 nm-openvpn[6429]: UDPv4 link remote: [AF_INET]<myIP>:1193
Jan 29 16:46:55 markswift3 nm-openvpn[6429]: [server] Peer Connection Initiated with [AF_INET]<myIP>:1193
Jan 29 16:46:56 markswift3 nm-openvpn[6429]: AUTH: Received control message: AUTH_FAILED,Data channel cipher negotiation failed (no shared cipher)
Jan 29 16:46:56 markswift3 nm-openvpn[6429]: SIGUSR1[soft,auth-failure] received, process restarting
Jan 29 16:46:57 markswift3 nm-openvpn[6429]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Jan 29 16:46:57 markswift3 nm-openvpn[6429]: TCP/UDP: Preserving recently used remote address: [AF_INET]<myIP>:1193
Jan 29 16:46:57 markswift3 nm-openvpn[6429]: UDPv4 link local: (not bound)
Jan 29 16:46:57 markswift3 nm-openvpn[6429]: UDPv4 link remote: [AF_INET]<myIP>:1193
Jan 29 16:47:08 markswift3 systemd[1]: systemd-hostnamed.service: Deactivated successfully.
My .ovpn file looks like this (with the keys appended):
client
dev tun
proto udp
remote <myIP> 1193
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
verb 3
no shared cipher
error. If you have not already maybe check out this: blog.zs64.net/2021/01/… and this: community.openvpn.net/openvpn/wiki/CipherNegotiation I don't pretend to understand it all but maybe you need to specifydata-ciphers
and/ordata-ciphers-fallback
?