1

I have an Ubuntu server and OpenVPN is working nicely there. I can succesfully traceroute/ping many servers. Also on this machine(with or without OpenVPN running), /etc/resolv.conf is picking up the DNS servers suggested by my modem/router which are just OpenDNS servers.

I have setup Kubuntu recently and have setup OpenVPN but whatever I do I cannot get an outside connection. Traceroute/ping fails. With or without OpenVPN, my /etc/resolv.conf always points to 127.0.1.1. using NetworkManager, I changed the IPv4 DNS DNS entries for my Wi-Fi device and tun0 to point to OpenDNS. I still have no outside connection.

I've searched around the net and came across the need to install network-manager-openvpn package. I installed it and then imported my working (from the ubuntu server) OpenVPN config file. and still no connection. (log message at the bottom). My VPN provider only provides the CA certificate.

Any ideas on how to fix it?

Thanks

OpenVPN config from provider

client
remote my-server-here.com 1194 udp
remote my-server-here.com 443 tcp-client

pull
auth-user-pass 
comp-lzo adaptive
ca ca.crt
dev tun
tls-client
script-security 2
cipher AES-256-CBC
mute 10

route-delay 5
redirect-gateway def1
resolv-retry infinite
#dhcp-renew
#dhcp-release
persist-key
persist-tun
remote-cert-tls server
mssfix

/var/log/syslog

Sep 17 11:10:54 tree NetworkManager[3705]: <info>  [1505612454.3007] audit: op="connection-activate" uuid="15e1c79d-d6e8-49e4-83bc-6ea882f99322" name="default" pid=4994 uid=1000 result="success"
Sep 17 11:10:54 tree NetworkManager[3705]: <info>  [1505612454.3074] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: Started the VPN service, PID 6701
Sep 17 11:10:54 tree NetworkManager[3705]: <info>  [1505612454.3220] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: Saw the service appear; activating connection
Sep 17 11:10:54 tree NetworkManager[3705]: nm-openvpn-Message: openvpn[6704] started
Sep 17 11:10:54 tree NetworkManager[3705]: <info>  [1505612454.3543] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: VPN plugin: state changed: starting (3)
Sep 17 11:10:54 tree nm-openvpn[6704]: OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Sep 17 11:10:54 tree nm-openvpn[6704]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Sep 17 11:10:54 tree nm-openvpn[6704]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sep 17 11:10:54 tree nm-openvpn[6704]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sep 17 11:10:54 tree nm-openvpn[6704]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
Sep 17 11:10:54 tree nm-openvpn[6704]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Sep 17 11:10:54 tree nm-openvpn[6704]: UDPv4 link local: [undef]
Sep 17 11:10:54 tree nm-openvpn[6704]: UDPv4 link remote: [AF_INET]164.220.22.23:443
Sep 17 11:11:54 tree nm-openvpn[6704]: TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sep 17 11:11:54 tree nm-openvpn[6704]: TLS Error: TLS handshake failed
Sep 17 11:11:54 tree nm-openvpn[6704]: SIGUSR1[soft,tls-error] received, process restarting
Sep 17 11:11:55 tree NetworkManager[3705]: <warn>  [1505612515.0985] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: VPN connection: connect timeout exceeded.
Sep 17 11:11:55 tree NetworkManager[3705]: libnm-Message: Connect timer expired, disconnecting.
Sep 17 11:11:55 tree NetworkManager[3705]: nm-openvpn-Message: openvpn[6704]: send SIGTERM
Sep 17 11:11:55 tree nm-openvpn[6704]: SIGTERM[hard,init_instance] received, process exiting
Sep 17 11:11:55 tree NetworkManager[3705]: <warn>  [1505612515.1014] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: VPN plugin: failed: connect-failed (1)
Sep 17 11:11:55 tree NetworkManager[3705]: <info>  [1505612515.1016] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: VPN plugin: state changed: stopping (5)
Sep 17 11:11:55 tree NetworkManager[3705]: nm-openvpn-Message: openvpn[6704] exited with success
Sep 17 11:11:55 tree NetworkManager[3705]: <info>  [1505612515.1018] vpn-connection[0x22ff580,15e1c79d-d6e8-49e4-83bc-6ea882f99322,"default",0]: VPN plugin: state changed: stopped (6)
Sep 17 11:11:55 tree org.kde.kdeconnect[4181]: "No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/NetworkManager/ActiveConnection/6"
0

This line :

Sep 17 11:10:54 tree nm-openvpn[6704]: UDPv4 link remote:[AF_INET]164.220.22.23:443

shows that openvpn is trying to connect using UDP to the TCP port you're trying to setup.

The corresponding configuration line should be:

remote my-server-here.com 443 tcp

And not tcp-client, tcp-client is an option of the --proto configuration.

I think you're using two different version of openvpn, and one of them is more strict about the parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.