OpenVPN server to use another VPN tunnel to forward internet traffic (listen tun0)

2

How to create VPN tunnel to tunnel? On my my server 1 there is working OpenVPN server but I would like to redirect traffic to another VPN.

Client can already connect to Server1 by VPN but how to connect to Server1 to get connected to Server2. Server1 has already working VPN client as well but how to route it.

Client -(VPN)-> S1 -(VPN)-> S2 -(Internet)->

Below is list of my interfaces. I'm using OpenVPN Access Server.

(1) all interfaces: 0.0.0.0
(2) venet0: 111.111.111.111 (OpenVZ eth0)
(3) venet0:0: 111.111.111.111
(4) tun0: 10.4.83.109 (VPN S2)

Now when user connects to VPN ip is same as venet0 but I want to connect by tun0 to Server2.

sukkis

Posted 2017-04-11T08:18:51.423

Reputation: 21

route add ipleak.net dev tun0

This change one address correctly but how do change all addresses via VPN? – sukkis – 2017-04-11T12:48:39.430

No answers