[solved] Lubuntu PIA client doesn't connect to VPN
There are several threads reporting this problem without solutions. I've succeeded to get the Ubuntu PIA client to connect, with support, only for it to fail again later, especially after updates. I think the Ubuntu PIA client is unreliable and PIA really need to sort this issue out. In the meantime, here's a workaround using OpenVPN only:
(either) If you have already installed the PIA client, then remove it. It will have already installed OpenVPN (Replace [user_name] with your Ubuntu home directory name):
(or) If you haven't installed the PIA client, then install OpenVPN only:
Download the PIA configuration files, key, and certificate from: https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpn
Direct link: https://www.privateinternetaccess.com/openvpn/openvpn.zip
Move the key and certificate files to OpenVPN directory:
Open the OpenVPN configuration file you want to use in a text editor, e.g. /home/[user_name]/Downloads/US East.ovpn:
Change the certificate & key paths to absolute paths (otherwise they will throw an error)
From:
So you don't have to enter your PIA account credentials each time you start OpenVPN, include them in the configuration file:
From:
Create the PIA user credentials file:
Enter your credentials on two lines, user, then password e.g.:
Move configuration file to OpenVPN dir:
I hope this helps!
(either) If you have already installed the PIA client, then remove it. It will have already installed OpenVPN (Replace [user_name] with your Ubuntu home directory name):
$ sudo rm -r /home/[user_name]/.pia_manager
(or) If you haven't installed the PIA client, then install OpenVPN only:
$ sudo apt-get install openvpn
Download the PIA configuration files, key, and certificate from: https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpn
Direct link: https://www.privateinternetaccess.com/openvpn/openvpn.zip
Unzip
Move the key and certificate files to OpenVPN directory:
$ sudo mv /home/[user_name]/Downloads/ca.rsa.2048.crt /etc/openvpn/ca.rsa.2048.crt
$ sudo mv /home/[user_name]/Downloads/crl.rsa.2048.pem /etc/openvpn/crl.rsa.2048.pem
Open the OpenVPN configuration file you want to use in a text editor, e.g. /home/[user_name]/Downloads/US East.ovpn:
client
dev tun
proto udp
remote us-east.privateinternetaccess.com 1198
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-128-cbc
auth sha1
tls-client
remote-cert-tls server
auth-user-pass
comp-lzo
verb 1
reneg-sec 0
crl-verify crl.rsa.2048.pem
ca ca.rsa.2048.crt
disable-occ
dev tun
proto udp
remote us-east.privateinternetaccess.com 1198
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-128-cbc
auth sha1
tls-client
remote-cert-tls server
auth-user-pass
comp-lzo
verb 1
reneg-sec 0
crl-verify crl.rsa.2048.pem
ca ca.rsa.2048.crt
disable-occ
Change the certificate & key paths to absolute paths (otherwise they will throw an error)
From:
crl-verify crl.rsa.2048.pem
ca ca.rsa.2048.crt
To:ca ca.rsa.2048.crt
crl-verify /etc/openvpn/crl.rsa.2048.pem
ca /etc/openvpn/ca.rsa.2048.crt
ca /etc/openvpn/ca.rsa.2048.crt
So you don't have to enter your PIA account credentials each time you start OpenVPN, include them in the configuration file:
From:
auth-user-pass
To:auth-user-pass user-pass.txt
Create the PIA user credentials file:
$ sudo nano /etc/openvpn/user-pass.txt
Enter your credentials on two lines, user, then password e.g.:
p1234567
AbCd3fGh1j
Write out (Ctrl + o), hit Enter, and close (Ctrl + x)AbCd3fGh1j
Move configuration file to OpenVPN dir:
$ sudo mv /home/[user_name]/Downloads/US East.ovpn /etc/openvpn/US East.ovpn
That's it! Now, to start OpenVPN, each time:$ sudo openvpn --config /etc/openvpn/US East.ovpn
I hope this helps!
Comments
systemctl start [email protected]
systemctl enable [email protected]
systemctl stop [email protected]
systemctl disable [email protected]
You can also just run the script provided in the page you linked to have NetworkManager manager the VPN
[[email protected] openvpn]$ sudo systemctl start [email protected]
Failed to start [email protected]: Unit [email protected] not found.
I've tried symlinking the .conf file to my chosen .ovpn file as well as copying the .ovpn to a .conf file and same result.
I've tried using "PIA" as well as "pia" for naming conventions in case I'm forking up the case.
I'm a little confused as to where the service name comes from.
p.s. I can start and stop the VPN using the files I have and so I know I have something right but would like the VPN to come up at boot time.
<QUOTE>
To add to this, if you name the file in /etc/openvpn ending with .conf, it will be managed by systemd and will automatically start the VPN right on boot.
systemctl start [email protected]
systemctl enable [email protected]
systemctl stop [email protected]
systemctl disable [email protected]
</QUOTE>
You should have a /etc/openvpn/client folder on this version of Fedora, and the service changed to openvpn-client. The updated commands would be: