I've been a Windows poweruser since forever and lately I got more interested in hosting and webservers. That's when the time has come to get my hands dirty with Linux and so I decided today to create a virtual machine running Ubuntu 18.04, installing apache on it and doing my first baby steps.

Unfortunately, I can only reach the webserver on Ubuntu, not on the host machine or any other device connected to the internet. Some googling later, I found out that I have to switch network adapter to bridged.

Now comes my issue. After i switched to bridged, the network connection is gone - and i tried to find a solution during the last 5h, by changing some stuff here and there or reinstalling the OS - without luck.

Since I'm a fresh born baby with this OS, I wanted to hear from some Linux poweruser what the issue could be and how I could solve it?

Error: Activation of Network connection failed

ifconfig with bridged Network: enter image description here

Virtual box Network settings:

enter image description here

/etc/network/interface file enter image description here

  • Since you are running with a GUI you should use Network Manager (one of the icons on the upper right side) to configure your connection. – T Nierath May 9 '18 at 12:45

I have a clue for you: Changing the network type on the VirtualBox side does not change how the VM "sees" it's network. The VM has the same virtual network interface, so the problem is on the host/network, not in the VM.

If you feel more comfortable with windows, try to install a windows VM with the bridged network, this will probably show you that the problem is on the host/network side.

  • Verify your firewall let the VM send and receive packets to the outside
  • Try a wired connection (if possible), your access point is perhaps refusing to give an IP address to your VM.
  • The last ressort will be to use NAT+Port forwarding.

Try this: put NAT mode, then do port-forwarding by forwarding the ports to the host's card. Of course you must have the address of the virtual machine and the host machine.

Port Forwarding Rules in VirtualBox

  • 1
    the picture is not visible, sorry. Click on the link to see it – Luciano May 9 '18 at 12:47
  • Thanks, it works but seems to be a workaround since the ifconfig still shows as inet I would like to set it up a way that my guest machine has it's own ip to fully work with apache – Tanckom May 9 '18 at 13:08
  • 1
    Sorry I did not understand your problem now. You do not like that address? If you want to change it you have to change the VirtualBox settings. – Luciano May 9 '18 at 13:18
  • I would like to use a different IP than my host machine :) – Tanckom May 11 '18 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.