I have the setup like this:
VPN Clients VPN Server 10.1.1.2 10.1.1.1 ---> Internet 10.1.1.3 10.1.1.4 10.1.1.5 | \ 10.0.0.0/24 LAN
The VPN clients are using the VPN server as default gw to the internet and they can see each other (for example I can ssh in from 10.1.1.2 to 10.1.1.5 without problems).
Now what I would like to accomplish is to reach a subnet where the 10.1.1.5 client is connected to from the 10.1.1.2 machine.
You would think that:
route add -net 10.0.0.0/24 gw 10.1.1.5
Would do the trick but I get: "SCIOADDR Network is unreachable" error message. Why is that? If I would try to use this machine as default gw that would be understandable but I only want to use it as a gateway to a subnet which by the way does not overlap with any other.
I use openvpn but I doubt it matters from routing perspective.
How to accomplish this without any proxies etc?
On the 10.1.1.5 I have:
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -o eth0 -j MASQUERADE