I have a host A which is connected to a global network and a local subnet. It's IPs are 77.37.194.100 and 10.1.1.1 respectively. There's server B (77.37.195.255) on the global network.

Another box C is connected to the subnet with IP 10.1.1.15. How to configure routing so that B is reachable from C?

PS: Global network is ISP's network, server B is a name server and C is a Virtual Box. A and C are Ubuntu.

link|improve this question

68% accept rate
feedback

1 Answer

up vote 2 down vote accepted

In you virtual machine, add a default route to your A box

route add default gw 10.1.1.1

Also you'll have to enable ip forwarding and masquerading on the A box : take a look at this article . Anyway the command for that will looks like:

sudo sysctl net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE
link|improve this answer
@nambuls: Wow! This magic worked! – Alex Aug 26 '09 at 12:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.