Setup PIA on Ubuntu 18.04

The following worked for me on Ubuntu 18.04.

  1. Install openvpn: install network-manager-openvpn-gnome.
  2. Install openconnect: install network-manager-openconnect-gnome and restart PC.
  3. Download the PIA openvpn.zip and extract to ~/Sources/pia-openvpn.
  4. Open VPN Settings and select "Import from file..." choosing US-East.
  5. Add your PIA username and password for the new VPN.
  6. Fix the network configuration to be managed...
    • Edit /etc/NetworkManager/NetworkManager.conf and set managed=true.
    • Restart Network Manager: service network-manager restart.

Other Useful Notes

Force Trasnsmission to use VPN

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