2

How can I do this? I searched but did not find any thing related or at least light a fire in my mind what to do:

Me --> connects to OpenVPN server A --> Server A connects through another OpenVPN to server B, so when I type my ip, it should show server B's IP

Or please help me for this, for Wireguard.

Both server A and B's OSes are Linux Ubuntu 20 and 22.

3
  • What have you tried so far? Have you tried just configuring those two VPN connections like normal? What problems did you encounter? Commented Sep 22, 2022 at 10:41
  • @user1686 nothing yet, because I don't know what to do and what exactly to search. I googled some keywords like openvpn tunnel one server to another, but the results were not what I mean.
    – Saeed
    Commented Sep 22, 2022 at 10:53
  • Mesh VPN is fairly complicated to set up. Otherwise point to point VPN is mostly what is used. No, you cannot connect the endpoint of one VPN to to beginning of a different VPN.
    – anon
    Commented Sep 22, 2022 at 12:10

1 Answer 1

0

It appears that you might be using the "wrong" terminology within your searches. As the topology mentioned in your posed question is not tunnelling, seeing that you are not trying to encapsulate VPN1 inside VPN2.

On the surface, this looks like you should be able to achieve your stated goal by leveraging static routes.

Try setting a static route on server A:

sudo ip route add 'VPN1-address' via 'VPN2-address' dev 'Physical-interface'

How to Permanently add Static Route in Linux

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .