I'm actually using a Linux 2.6.32-5-amd64 (Debian 6) server, which should NAT between both VPNs.
Both VPNs are working fine if I use them alone.
I'm trying to get the following configuration:
Client PC is running a VPN1 client to connect to the VPN1 server at tun1 on the server.
NAT forwards packets from tun1 to tun0.
VPN1 server is running an openvpn client to connect to VPN2 (tun0 on the first server).
VPN2 server works as exit to the internet.
My problem is that the routing is not working.
My server is configured as VPN2-client (tun0) with IP 10.9.0.42 and gateway 10.9.0.41.
VPN1 server runs at tun1 in 10.6.0.0/24.
What I tried to do yet:
Enabling packet forwarding in kernel:
echo "1" > /proc/sys/net/ipv4/ip_forward
Tried several iptables configurations from the internet with NAT / POSTROUTING parameters.
I disabled routing features in the the .conf file:
# no routes
so i can reach the server without being connected to VPN2.Same post in german forum