T
T
trenikiVshtaniki2021-02-22 16:17:40
VPN
trenikiVshtaniki, 2021-02-22 16:17:40

How to organize a vpn with an intermediate server?

Good afternoon, the essence of the question is this, it is necessary to build a vpn connection in this way the client connects to server A (preferably IKEv2), the client traffic is forwarded to server B (I don’t know what will be easier, faster and better here). Servers are located in different countries.
As a result, having connected to server A on the Internet, the client appears as if sitting from server B (client -> A -> B -> internet).

What is the best way to do this? I didn’t find any clear manuals (in general, I don’t understand network administration well). As I understand it, you can use ipsec.conf + iptables to set up a bridge between servers A and B and between client and server A

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ky0, 2021-02-22
@ky0

Why bother with a forward when you can just arrange routing between your vpn clients and server B? Make the same tunnel between A and B - and get clients and the destination server on the same local network, after which nothing prevents you from making B the gateway.

C
CityCat4, 2021-02-24
@CityCat4

Tunnel between servers A and B. On server A - distribution of IP and policies like "everything that came from 1.2.3.4/24 - to server B". Server B has a policy like "accept everything that came from 1.2.3.4/24 locally" (that is, deliver the packet according to the routing table, which will force server B to send the packet to its default gateway).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question