I'm trying use a network bridge adapter for my VM (fresh Ubuntu server 16.04 LTS install) within the latest version of Virtualbox (v5.0.20). Running ifconfig -a
gives the following output:
As you can see the IP-address is 192.168.3.59, which is being assigned by the DHCP server of my host network (subnet 192.168.3). So everything seems to work just fine, but when I'm trying to ping to 8.8.8.8
, for example, I get the following error message:
Connect: network is unreachable
I've tried different adapter settings, disabling the firewall, created new VM's and Googled everything I could think of; however, nothing solved the problem.
Some more information which may be useful:
- The host PC runs on Windows 10
- The interfaces (
/etc/network/interfaces
) file is untouched - Using two adapters (NAT and host-only) works, but this is not what I need
- I have an old VM (Ubuntu 14.03) working just fine with the bridge adapter
Any help/suggestions would be greatly appreciated!
Edit: added routing table
ip route show
outputs the following:
172.23.23.0/24 via 192.168.3.108 dev enp0s3
192.168.3.0/24 dev enp0s3 proto kernel scope link src 192.168.3.59
Best Answer
You're missing default route for traffic outside the scope of the subnet. Run following command as privileged user:
This should allow you to ping google's servers and make outside connections. Making this setting permanent (to persist after reboot) will depend on the method your VM connects, but this should work on most systems: http://www.linuxquestions.org/questions/linux-networking-3/permanently-add-static-route-16769/