1

Say I have two machines, both running Linux;

Machine A is running a VPN server and is behind a NAT.

Machine B is the VPN client.

Machine A creates a reverse SSH tunnel from itself to Machine B, exposing a port on Machine B that connects back to the VPN running on Machine A.

How can I connect to Machine A's VPN server from Machine B through the SSH reverse tunnel?

  • I've seen something similar done with this using iptables; askubuntu.com/questions/324685/how-to-route-all-internet-traffic-through-tor-the-onion-router – user1973385 Aug 31 '18 at 03:12

1 Answers1

2

A SSH tunnel only works with TCP, so your VPN server must be configured to use TCP for connections. You connect the the tunnel endpoint on Machine B just as you would connect to Machine A. In other words, just replace the ip address and destination port in your client configuration.

RalfFriedl
  • 3,108
  • 4
  • 13
  • 17