Host-only networking on Linux (Ubuntu): routing how-to?
Posted: 5. Jul 2009, 11:47
Virtualbox version 3
Host: Ubuntu 9.04
Guest: Backtrack 4 pre-final (Ubuntu based)
Goal: Make the ip of the Guest reachable to other machines on the LAN
I don't know much about network routing, maybe someone here knows more about it than me.
I'm using Host-only networking which creates the virtual interface vboxnet0 for me.
Host eth0 IP: 192.168.0.1
Host vboxnet0 IP: 192.168.1.1
Guest eth0 IP: 192.168.1.2
The IP 192.168.1.2 is pingable from the host and 192.168.0.1 is pingable from inside the guest. But I wasn't able to ping my router (192.168.0.23). I've played around with the commands "ip route" and "route", but it didn't help. I've RTFM but it seems I'm too stupid or I'm missing something.
Is it even possible? To make the host route packets from the virtual network 192.168.1.0/24 to machines in the network 192.168.0.0/24 and vice versa?
I know there are other possibilities than changing the routing, but using vboxnet0 would be most useful for sniffing etc. If it doesn't work I'll probably use port forwarding from the host to the virtual network.
Host: Ubuntu 9.04
Guest: Backtrack 4 pre-final (Ubuntu based)
Goal: Make the ip of the Guest reachable to other machines on the LAN
I don't know much about network routing, maybe someone here knows more about it than me.
I'm using Host-only networking which creates the virtual interface vboxnet0 for me.
Host eth0 IP: 192.168.0.1
Host vboxnet0 IP: 192.168.1.1
Guest eth0 IP: 192.168.1.2
The IP 192.168.1.2 is pingable from the host and 192.168.0.1 is pingable from inside the guest. But I wasn't able to ping my router (192.168.0.23). I've played around with the commands "ip route" and "route", but it didn't help. I've RTFM but it seems I'm too stupid or I'm missing something.
Is it even possible? To make the host route packets from the virtual network 192.168.1.0/24 to machines in the network 192.168.0.0/24 and vice versa?
I know there are other possibilities than changing the routing, but using vboxnet0 would be most useful for sniffing etc. If it doesn't work I'll probably use port forwarding from the host to the virtual network.