Bridged Network from Windows 10 host to Ubuntu 18.04 guest in Virtualbox not working

2

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

Tanckom

Posted 2018-05-09T12:20:48.940

Reputation: 121

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 – 2018-05-09T12:45:35.823

Answers

3

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.

pim

Posted 2018-05-09T12:20:48.940

Reputation: 662

3

I concur. putting a wireless adapter in a bridge requires support from both the system, AND the AP. the card has to go from 3-mac-addresses mode to 4-mac-addresses mode ( https://networkengineering.stackexchange.com/questions/25100/four-layer-2-addresses-in-802-11-frame-header ). Same for the AP

– A.B – 2018-05-09T19:16:45.747

1

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

Luciano

Posted 2018-05-09T12:20:48.940

Reputation: 33

1the picture is not visible, sorry. Click on the link to see it – Luciano – 2018-05-09T12:47:16.727

Thanks, it works but seems to be a workaround since the ifconfig still shows as inet 10.0.2.15 I would like to set it up a way that my guest machine has it's own ip to fully work with apache – Tanckom – 2018-05-09T13:08:29.187

1Sorry 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 – 2018-05-09T13:18:18.877

I would like to use a different IP than my host machine :) – Tanckom – 2018-05-11T17:21:56.530