Setup PIA on Ubuntu

Add the Certificate

  • Download the openvpn.zip file from PIA.
  • Save the ca.crt file to /etc/openvpn/ca.crt.

Create the Network Manager Connections

  • Edit the file at /etc/NetworkManager/system-connections/PIA-US-East.
  • Add the contents from the text below, use uuidgen to create a uuid.
  • You can lookup DNS Servers here.
[connection]
id=<NAME>
uuid=<GENERATED-UUID>
type=vpn
autoconnect=false

[vpn]
service-type=org.freedesktop.NetworkManager.openvpn
username=<PIA-USERNAME>
comp-lzo=yes
remote=<PIA-DNS>:<PIA-PORT>
connection-type=password
password-flags=1
ca=/etc/openvpn/ca.rsa.2048.crt

[ipv4]
method=auto

Configure Network Manager and Test

  • Edit /etc/NetworkManager/NetworkManager.conf and set managed=true.
  • Restart Network Manager: service network-manager restart.
  • Test everything is working by visiting https://ipleak.net/.

Safe Trasnsmission

sudo groupadd vpnroute
sudo iptables -A OUTPUT -m owner --gid-owner vpnroute \! -o tun0 -j REJECT
sudo -g vpnroute transmission-gtk &