Hi all,
I'm trying to setup an Ubuntu guest on an Ubuntu host so that the guest can reach the host's network, but nothing else.
Code:
guest network: 192.168.56.0/24
guest ip eth0: 192.168.56.101
host network: 192.168.99.0/24
host ip p2p1: 192.168.99.4
host ip vboxnet0: 192.168.56.1
This is what i did so far which doesn't work:
On the guest i added a route for the host's network
Code:
#route add -net 192.168.99.0 gw 192.168.56.1 netmask 255.255.255.0 dev eth0
#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.56.0 * 255.255.255.0 U 1 0 0 eth0
192.168.99.0 192.168.56.1 255.255.255.0 UG 0 0 0 eth0
This seems to work and I can ping the host's ip 192.168.99.4
Now I enabled ipforwarding on the host with
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
and it seems to be activated for all interfaces
Code:
cat /proc/sys/net/ipv4/conf/*/forwarding
1
1
1
1
1
but I cannot reach any other pc in the 192.168.99.0 network. There is no firewall set up.
Code:
iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Is there anything else I forgot to do?