For the guys using port forwarding, I would like to let you know that the script on pg 2 is creating a new client id every time it runs, making PIA think you're using a different client, changing your port assignments.
To fix this run this in any terminal:
Code:
head -n 100 /dev/urandom | md5sum | tr -d " -"
Then replace the client_id value in lines 45 and 49 with the output of the command.
You will need to run the script at least once an hour so the port doesn't change. If you do this your port should only change if you get a new IP address assigned.
Here's my personal script, it is based on eric's but it reads credentials from a file. Where line 1 is username, line 2 is password and line 3 is the generated client id.
Code:
#! /usr/local/bin/bash
#
# Script based on Eric Rudd's script at https://forums.freenas.org/index.php?threads/guide-setting-up-transmission-with-openvpn-and-pia.24566/page-2#post-174778
#
# Make sure you have a file named piacreds in the same directory as the script
# 1st line of the file is pia username, 2nd password and third client id
#
# to generate a new client id run
# head -n 100 /dev/urandom | md5sum | tr -d " -"
# in any terminal
#
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROGRAM=`basename $0`
USER=`head -n 1 $SCRIPTDIR/piacreds`
PASSWORD=`head -n 2 $SCRIPTDIR/piacreds | tail -1`
CLIENT_ID=`head -n 3 $SCRIPTDIR/piacreds | tail -1`
local_ip=`ifconfig tun0 | grep "inet " | cut -d\ -f2|tee /tmp/vpn_ip`
json=`wget --no-check-certificate -q --post-data="user=$USER&pass=$PASSWORD&client_id=$CLIENT_ID&local_ip=$local_ip" -O - "https://www.privateinternetaccess.com/vpninfo/port_forward_assignment" | head -1`
PORTNUM=`echo $json | grep -oE "[0-9]+"`
echo $PORTNUM
transmission-remote -p $PORTNUM
exit 0
If you don't want to use a separate file you can just replace the values in the script.