0

I've set up a VPN on OpenVPN using a VPS, and I would like to change the VPN IP address from the VPS Server IP address to the VPN IP which OpenVPN has given.

I know its a bit confusing but right now for example when I have connected to the VPN, my IP address is the same as the VPS IP, and it says connected to "186.218.98.45/UDP as OpenVPN 0:12 using VPN IP 174.85.322.5" I don't want my IP address to be the VPS 186.218.98.45 when I google "whats my IP" is there any way I can change this? the VPS I'm using is Debian 8 64bit. And one more question, can I have multiple VPN IPs on OpenVPN using 1 VPS server? if yes that what is the process I would really like to learn.

0

You have an IP address that exists within the tunnel, we'll say 10.2.1.2. Your VPS has an IP on this network as well, we'll say 10.2.1.1. When you connect to the VPN, the device opens a connection to the VPS's public IP, then a new interface is created on the client (such as tun0 or tap0 depending on the configuration). Assuming you are sending "all traffic", your device will send data from 10.2.1.2 to 10.2.1.1, then the VPN server has to do something with this traffic.

In most instances, VPN is a NAT network behind the VPN server, so your client is now sending it's data to the VPS in this encrypted tunnel to 10.2.1.1. The VPS now has to send the data to the internet, get a response, and send it back to your client.

This NAT process is how you end up with the IP of your VPN. The VPS is sending the data on your behalf.

If you don't want this IP to be the one on the internet, don't use the VPN in the first place. You cannot change this.

  • Ah, that's really helpful, I'm a noob when it comes to networking so that really helped me. – Sheryar Khan Mar 27 '18 at 15:22
0

I don't want my IP address to be the VPS 186.218.98.45 when I google "whats my IP" is there any way I can change this?

Unless you have more IP addresses assigned/routed to your VPS, then no. Many VPS providers only assign each instance one IPv4 address. Unless your provider gives you the ability to assign more, then you only really have one address option for the VPN traffic to leave the server on.

can I have multiple VPN IPs on OpenVPN using 1 VPS server?

Depends on what you mean by "VPN IPs". If you're on about publicly routable IP addresses then it really goes back to the previous statement that you can only use the addresses you have, however if you own a publicly routable subnet, then you can hand them out to the VPN clients however you wish.

  • Oh alright, and yes I mean the publicly routable IP addresses. well, thanks for clearing that up! – Sheryar Khan Mar 27 '18 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.