Skip to main content

Can I configure the VPN connection to always use the same IP address? - Knowledgebase / Technical / Application Settings and Features / Servers - PIA Support Portal

Can I configure the VPN connection to always use the same IP address?

Authors list

If you want to always connect the VPN using the same IP address,instead of using our gateways directly, which will normally rotate through our gateways IP addresses giving your connection the best IP address with the less ping time. First you would require the use of the OpenVPN application instead of the PIA app.

Windows: 

For instructions on installing OpenVPN please review the guide for Windows Here.

Next, you will need a static server IP address to assign to your connection. To obtain an IP address from one of our servers, please open a Command Prompt window and type:

ping (hostname of server you want IPs for. A list of our servers can be found here: https://www.piaproxy.net/pages/network/) and hit enter. You should then get an IP address for the hostname you entered. (ex. 123.45.67.89)

For example: ping us-california.piaproxy.net

Once that is done:

  1. Right click the icon for OpenVPN and choose the server you want to connect to.
  2. Click Edit config; this will open the config file for the server.
  3. Replace the server name (ex. us-california.piaproxy.net) with the IP address for the server you obtained above.
  4. Save the changes.

Mac:

For instructions on installing OpenVPN please review the guide for MacOS using Tunnelblick.

Next, you will need a static server IP address to assign to your connection. To obtain an IP address from one of our servers, please open a Terminal window and type:

ping (hostname of server you want IPs for. A list of our servers can be found here: https://www.piaproxy.net/pages/network/)and then hit enter. You should get an IP address for the hostname you entered. (ex. 123.45.67.89)

For example: ping us-california.piaproxy.net

Once this is done, please do the following (enter Mac passwords where needed):

  1. Choose "VPN Details" from the Tunnelblick menu.
  2. In the window that appears, click on the "Configurations" button at the top of the window.
  3. Click to select the configuration file in the list along the left hand side of the window that you want to edit.
  4. Click on the "gear" icon that is below the list of configurations.
  5. Click to select "Edit OpenVPN Configuration File..." . If "Edit OpenVPN Configuration File..." is not available but "Examine OpenVPN Configuration File..." is, choose “Make Configuration Private", click the gear icon again, and choose the new "Edit OpenVPN Configuration File…" option.
  6. You should then see the file open in an TextEdit window. Replace the server name (ex. us-california.piaproxy.net) with the IP address for the server you obtained earlier. Then, choose File >Save to save the change, and Quit TextEdit.

Now every time you connect to that server, it will connect to only the IP address you have specified.

At this time we don't have explicit instructions for Linux, due to the various ways you can connect on this platform. However, you can find the ‘.ovpn’ or NetworkManager configuration file to update and replace the hostname in that configuration file with an IP address you can lookup using the dig <hostname> command.

If you have any troubles with these steps, please contact our support here.