A
A
AlizonJohn2017-06-19 14:32:31
openvpn
AlizonJohn, 2017-06-19 14:32:31

Is it possible to set up two OpenVPNs on one VPS so that each one accesses the Internet from its own IP?

Good day to all, gentlemen.

I bought a VPS - it already had 1 IPv4 address, let's say 1.1.1.1 . I bought another dedicated IPv4 address for this VPS, let's say 2.2.2.2

2 clients connect to the server: client A and client B.

Is it possible to configure the OpenVPN configuration in such a way that:
Client A, connecting to the server, accessed the Internet through the address 1.1.1.1
Client B, connecting to the server, accessed the Internet through the address 2.2.2.2

That is, I want to have several IP addresses on one server and be able to access the network from any of them. Is it possible?

Thanks for answers!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Burov, 2017-06-19
@BuriK666

Maybe.

J
Jaguar77, 2017-06-26
@Jaguar77

google://netns

Y
younghacker, 2017-07-24
@younghacker

It's not that the OpenVPN configuration is the system's kernel configuration.
And here iproute2 will definitely help you. Routing based on client address.
But in order to fix the client address (VPN) behind some external address, you need to configure a static address for the client certificate and prohibit entry with duplicate cn, or raise a second VPN server on a different external port with a different internal mesh. Then we connect to the first VPN, we get 1.1.1.1, we connect to the second VPN, we get 2.2.2.2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question