So I've got a server at work which runs its own local subnet. I can vpn in, but have to setup a route to the network this machine is on to access it. I'm looking to natively access the second subnet. Everything is Linux (Ubuntu, Debian and embedded stuff). Here are details:
- I start my vpn and get an IP on 192.168.100.0
- I set a route to the network my server is on: 192.168.2.0; I can now ssh into the server and access the third subnet but this is very slow doing anything graphical
- The third subnet, 192.168.0.0 is exclusively accessible on the server on eth2
- So starting with 192.168.100.0, I set a route to natively access 192.168.2.0. My server then controls 192.168.0.0.
Is there a way (there must be) to route or tunnel into that machine and locally ping or bring up webpages on 192.168.0.0?
So I (at home, 192.168.1.0) --> VPN (192.168.100.0) --> route to server's network (192.168.2.0) --> route to server's subnet on eth2 (192.168.0.0)?
I tried setting up nat rules but to no avail... machines on the final subnet can see the outside world, but I can't see in:
echo 1 > /proc/sys/net/ipv4/ip_forward /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE /sbin/iptables -A FORWARD -i eth0 -o eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT /sbin/iptables -A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT