pivpn: Can't connect from Linux Mint (works from iOS using OpenVPN Connect)
Hi. I have used the PiVPN script to successfully set up a VPN on a Raspberry Pi 3 running Raspbian Jessie Lite. It was pretty nice and straightforward.
Using my iPhone, I have imported the username.ovpn for my one and only client into the OpenVPN Connect app, and connection works like a charm.
However, on my laptop I am running Linux Mint 17.3 (Cinnamon), and I have attempted to set up the connection. I have copied over the username.ovpn, created a folder ~/.ovpn and I have used the OVPN Splitter script (https://gist.github.com/penguinpowernz/36883ba5c8bf51bdb5d1) to extract the ca.crt, client.crt, client.key and ta.key into my ~/.ovpn directory, and also have a stripped down username.ovpn file which links those files. I now used that new username.ovpn file and imported it into the Network Manager, and it set up the IP and certificate/key files as expected. However, when I try to start the connection, it seems to work for some time and then gives up.
I have taken the following extract from /var/log/syslog, but I don’t see what the problem is:
NetworkManager[947]: <info> Starting VPN service 'openvpn'...
NetworkManager[947]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 5490
NetworkManager[947]: <info> VPN service 'openvpn' appeared; activating connections
NetworkManager[947]: <info> VPN plugin state changed: starting (3)
NetworkManager[947]: <info> VPN connection 'username' (Connect) reply received.
nm-openvpn[5498]: OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec 1 2014
nm-openvpn[5498]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
nm-openvpn[5498]: WARNING: file '/home/username/.ovpn/client.key' is group or others accessible
nm-openvpn[5498]: WARNING: file '/home/username/.ovpn/ta.key' is group or others accessible
nm-openvpn[5498]: Control Channel Authentication: using '/home/username/.ovpn/ta.key' as a OpenVPN static key file
nm-openvpn[5498]: UDPv4 link local: [undef]
nm-openvpn[5498]: UDPv4 link remote: [AF_INET]xxx.xxx.xxx.xxx:1194
NetworkManager[947]: <warn> VPN connection 'username' (IP Config Get) timeout exceeded.
NetworkManager[947]: <info> Policy set 'Auto oppenheimer' (wlan0) as default for IPv4 routing and DNS.
nm-openvpn[5498]: SIGTERM[hard,] received, process exiting
NetworkManager[947]: <info> VPN service 'openvpn' disappeared
Any help is much appreciated!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (6 by maintainers)
I was seeing the same issue on Debian 8, and wanted to post here in case it helps others.
The problem appears to be that the version of
openvpnin the Debian repos is outdated (unsurprisingly). I fixed this by adding the openvpn repo as described here.After adding the new source, in order to install the new version, first remove the old one:
sudo apt-get remove openvpnDoing so may also automatically remove the network-manager packages,
in which case simply make a note of them and you can reinstall them after updating
openvpn.After adding the new repo, I found that
apt-getdid not automatically select the correct package. To solve this, dosudo apt-get updatefollowed by
sudo apt-cache policy openvpnwhich should spit out something like:
You want to install the specific version from the build.openvpn.net source, so do
sudo apt-get install openvpn=2.4.0-jessie0to install the updated version.
After that, reinstall the network-manager packages
sudo apt-get install network-manager-openvpn network-manager-openvpn-gnomeand be sure to reboot or otherwise restart the NetworkManager service before testing.