Routing Wrinkles
Posted about 1 year ago
I have been wrestling with Virtual Box for the past couple of days trying to get a small network of virtual machines communicating using the host machine (Kubuntu 8.04) as a router. Have been able to get the guest machines to communicate to the host machine and even to my server then on to the Interweb! Routing through Linux is so much fun and not hard to configure.
I often get stuck on a very simple and humbling problem. For some reason I always forget that the machine(s) being routed to will need to know how to get back. It happens to me a lot. I have been banging my head on the desk wondering why I can't get to 10.23.23.1 but I can get to 10.23.23.2, because I CAN get to 10.23.23.1, but 10.23.32.1 just does not know which route to take to get back to me.
Anyway, I have the kernel set to forward packets with:
echo '1' > /proc/sys/net/ipv4/ip_forward
The host machine knows how to get to both guest machines, and they know how to get to the host machine. They are both on the same network so a route that says use 192.168.0.2 to get to 192.168.0.0/24 should certainly be enough.
If I figure out what the problem(what I am overlooking) is I will update this blog.
Up too late again...but what is the point of living life if you don't live it!
Sean



