P
P
Peter Krupnev2021-03-02 19:36:52
openvpn
Peter Krupnev, 2021-03-02 19:36:52

How to wrap all connections to the server through OpenVPN?

There is an Ubuntu VPS, with OpenVPN.

Clients - Windows.
When the vpn tunnel is active, traffic to the rest of the world goes through it (everything is as required).
But SSH, VNC go directly to the same server.

I would like to wrap everything in general in OpenVPN, so that the traffic goes through the tunnel, and on the other side it "emerges" from tun0 and gets to localhost, so that the shell has "Login from 127.0.0.1"

Apparently, you need to stir up with iptables / route / gateway ? Tell me if anyone knows how!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-03-02
@peterkrup

Connect to a local address. The route to the VPN server IP address (for obvious reasons) always goes through the public network. You can, of course, use different routing tables - but it's much easier to just go to internal addresses.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question