[openVPN] server & client on same machine . And multiple VPN servers
- by HiWorld
Hello everyone,
im stucked configuring openvpn to build a multi vpn connection. like this:
CLIENT - VPN1 - VPN2 - INTERNET
Well, i already have and know how to done a normal sigle vpn but want to use a chain of vpns, so i explain what i have done and how i did it.
ON VPN1.
i have 1 openvpn instance running as server( where client connect to) and another as client connecting to VPN2 running as server. { Here comes the problem } when i connect VPN1 as client of VPN2 i cant connect to VPN1 from CLIENT, my question is HOW TO procced with this...
Also have another third instance working as server to use VPN1 without chains.
ON VPN2.
1 openvpn instance as server where VPN1 will connect and then forward to the NET.
Im using TUN interface on configs.
And iptables are on this way:
VPN1 - openvpn ip server1 : 192.168.6.0 / ip as client of VPN2: 192.168.5.70
iptables -t nat -A POSTROUTING -s 192.168.6.0 -j SNAT --to-source 192.168.5.70
VPN2 - openvpn ip server2 : 192.168.5.0
iptables -t nat -A POSTROUTING -s 192.168.5.0/24 -j SNAT --to-source EXTERNAL_IP_TO_INTERNET
Hope someone help me with this. thanks in advance