0

I have two Linux machines, a client (C) in one country and a server (S) in another one.

I want to route all traffic from C to S, and therefore a VPN would be the best solution for me, but both C and S are behind NAT, and the ISP does not allow port forwarding. I don't even want to use any services like ngrok, and I want to do it myself to have complete control (and learn something new).

Therefore, I want to use a VPS that acts as a "bridge":

C --> VPS --> S

However, I am missing how to configure the VPS to be the bridge so far I was just able to use VPS as a server, namely:

C --> VPS <-- S

I used this script: https://github.com/angristan/wireguard-install

What do you suggest? I am also open to use another software, and I thought it would be easier with wireguard.

Simone Aonzo
  • 101
  • 1
  • You probably want an reverse SSH tunnel. This is a method of connection S to your VPS, in such a way, that the VPS can connect back to S. After that you can establish a SSH tunnel from C to S via VPS (lookup on ssh jump host) and thorugh all that you can build your wireguard tunnel – Malik Jun 09 '22 at 06:55
  • Is this what you're trying to do?: https://www.procustodibus.com/blog/2022/06/multi-hop-wireguard/#internet-gateway-as-a-spoke – Justin Ludwig Jun 13 '22 at 18:33

0 Answers0