Skip to main content

Introducing Next Generation Port Forwarding - News / Announcements - PIA Support Portal

Sep 21 2020

Introducing Next Generation Port Forwarding

Authors list

In an effort to provide users with the ability of using the port-forwarding feature outside of the application, for use with router-based or manual setups, we have created a script which you can use to pull a port. Please keep in mind, this project is a work in progress and we expect to make changes as the project continues to move forward. The following steps are for the release of v.0.1.0 and can be found here:

Automated setup of VPN and/or PortForwarding

In order to help you use VPN services and Port Forwarding on any device, we have prepared several bash scripts which should help you assist you with the set-up process. The scripts also contain a lot of comments, just in case you require detailed information regarding how the technology works.

Here is a list of scripts you could find useful:

  • Get the best region and a token: This script helps you to get the best region and also to get a token for VPN authentication. The script will extend it's functionality if you add extra environment variables. Adding your PIA credentials will allow the script to also get a VPN token. The script can also trigger the WireGuard script to create a connection, if you specify PIA_AUTOCONNECT=wireguard.
  • Connect to WireGuard: This script allow you to connect to the VPN server via WireGuard. You can specify PIA_PF=true if you also wish to get Port Forwarding for your connection.
  • Connect to OpenVPN: We are still working on this script.
  • Enable Port Forwarding: Enables you to add Port Forwarding to an existing VPN connection.

Manual setup of PF

To use port forwarding on our Next Generation Network, you will first need to establish a connection on the protocol of your choice. After this connection is established, you will need to find the private IP of the gateway you are connected to. In case you are using WireGuard, the gateway will be part of the JSON response you get from the server, as you can see in the bash script.  If you are using OpenVPN, you can find the gateway by checking the routing table with ip route s t all.

For more information regarding this setup, please reference the following support article. As always, should you experience any issues with port-forwarding, please don't hesitate to reach out to our support team via chat or by submitting a ticket, here.