Failed to fix IP address using OpenVPN

I was trying to configure the VPN connection to always use the same IP address following instructions in: 

I am a PIA user in Hong Kong so I did the following steps with the Hong Kong server (hk.privateinternetaccess.com) in Windows 7 as well as Ubuntu 16.04 environments. 

In Ubuntu 16.04 I also referred to the guide in https://helpdesk.privateinternetaccess.com/hc/en-us/articles/219438247-Installing-OpenVPN-PIA-on-Linux. I obtained the network configuration files from https://www.privateinternetaccess.com/openvpn/openvpn.zip then replaced the hostname in 'Hong Kong.ovpn' with an IP address (119.81.253.229) I obtained using the command 'dig hk.privateinternetaccess.com'.

Problem:

1. I failed to obtain the IP that is provided by the Hong Kong server(the one that starts with 119.xx). With the command 'ifconfig' I can only see the IP from my ISP and another IP(which starts with 10.xx) that is used by OpenVPN client during connection.

2. None of the IPs are fixed.

I am attaching the messages I got from OpenVPN when it was establishing connection in Windows 7. The ones I have in Ubuntu are pretty much the same.

Has anyone experienced similar problems when they try to fix their IP address with OpenVPN?


Comments

  • edited July 2017
    So in the OpenVPN config file for Hong Kong you replaced this line?

    remote hk.privateinternetaccess.com 1198
    with this line
    remote 119.81.253.229 1198

    Is this correct?

    When I ping hk.privateinternetaccess.com I get 161.202.39.246. You may want to try that address and see what the results are.

  • So in the OpenVPN config file for Hong Kong you replaced this line?

    remote hk.privateinternetaccess.com 1198
    with this line
    remote 119.81.253.229 1198

    Is this correct?

    When I ping hk.privateinternetaccess.com I get 161.202.39.246. You may want to try that address and see what the results are.

    Yes, this is what I did. The result are the same when I tried the address you provided.
  • edited July 2017
    OK, when I start my OpenVPN the first thing that happens is I am assigned an IP address from PIA. This address is usually 10.x.y.z. on my TAP adapter. Once the link is established I go to one of the leak sites to see what my exit IP address is. 173 .x.y.z is the result that I get. If I disconnect and come back later, reconnect, the 10.x.y.z address changes, but the exit address of 173.x.y.z is still the same. Thus being static.

    So I am wonder if you think that the TAP IP address should also be static. That is probably not the case. The TAP address is dynamic. However, the gateway address might be dynamic (hk.privateinternetaccess.com) but if a single IP address for that gateway should result in a static exit IP address. Should being the operative word. I know it works on my end with US-California, but have not tried it on the HK server. I just might to see what happens.

    added - I gave it a try and found that the server IP address stayed the same, the TAP IP address (assigned to computer) was dynamic with the second octet changing, and the exit IP address remaining the same.
  •  Omnibus_IV said:
    OK, when I start my OpenVPN the first thing that happens is I am assigned an IP address from PIA. This address is usually 10.x.y.z. on my TAP adapter. Once the link is established I go to one of the leak sites to see what my exit IP address is. 173 .x.y.z is the result that I get. If I disconnect and come back later, reconnect, the 10.x.y.z address changes, but the exit address of 173.x.y.z is still the same. Thus being static.

    So I am wonder if you think that the TAP IP address should also be static. That is probably not the case. The TAP address is dynamic. However, the gateway address might be dynamic (hk.privateinternetaccess.com) but if a single IP address for that gateway should result in a static exit IP address. Should being the operative word. I know it works on my end with US-California, but have not tried it on the HK server. I just might to see what happens.

    added - I gave it a try and found that the server IP address stayed the same, the TAP IP address (assigned to computer) was dynamic with the second octet changing, and the exit IP address remaining the same.
    Thanks for pointing this out. My TAP IP address is dynamic while the exit IP (the one I wrote onto the config file) is indeed static. The issue is solved now.
Sign In or Register to comment.