VirtualBox – Fixing Internet Connection Issues on Ubuntu 17.04

17.04networkingvirtualbox-networking

I upgraded Ubuntu 16.04 LTS to 17.04 last two days ago. Ever since, I've been trying to connect to the internet, tried to change the 'bridged adapter' under setting > network. left at "NAT" ( as default option ); still didn't work. I tried a few things that I saw on Youtube, but still is not connecting to internet.

At some point, I noticed under "VirtualBox Host-Only Network #2" IPv4 was set to some random IP address within my subnet mask (at least looked that way to me). I changed to DHCP hoping it would fix the issue. No luck.

At this point, I have feeling that if for some one who is familiar with VM than I am, it might be just a few clicks and fix the issue. I seemed to cannot figure that out.

Can someone shed some light on what should I do next please?

Best Answer

I had a similar issue. I tried switching to bridged, etc, and nothing seemed to work. Eventually I switched back to NAT, and found out which interfaces were available:

lshw -C network

I noticed that the networking was DISABLED. Then I manually brought up the interface:

ifconfig enp0s17 up

But after that it still wouldn't work. I had to manually get it to get an IP address using

dhclient enp0s17 -v

That did the trick and it's working now. Not sure if this will help your issue, but it fixed mine.