Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port forward assignment #1

Open
kusmierz opened this issue Dec 15, 2016 · 0 comments
Open

Port forward assignment #1

kusmierz opened this issue Dec 15, 2016 · 0 comments

Comments

@kusmierz
Copy link

Maybe somebody find it useful:

apk add --no-cache libssl1.0 ca-certificates wget jq
local_ip=`ifconfig tun0|grep -oE "inet addr: *10\.[0-9]+\.[0-9]+\.[0-9]+"|tr -d "a-z :"|tee /tmp/vpn_ip`
remote_ip=`wget -q -O - 'https://www.privateinternetaccess.com/vpninfo/myip' | head -1`
client_id=`head -n 100 /dev/urandom | md5sum | tr -d " -"`
port=`wget -q --post-data="user=$USERNAME&pass=$PASSWORD&client_id=$client_id&local_ip=$local_ip" -O - 'https://www.privateinternetaccess.com/vpninfo/port_forward_assignment' | jq -r '.port'`

Changing client_id will open new port for you. The old one will be still accessible. I don't know if there is any limit for this. echo "$remote_ip:$port" will show you forwarded port info.

More: https://www.privateinternetaccess.com/forum/discussion/3359/port-forwarding-without-application-pia-script-advanced-users and https://www.privateinternetaccess.com/installer/port_forward.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant