Have you ever created an Ubuntu Server virtual machine and added a new bridged networking adapter after your setup? You would have thought that it’ll detect it automatically or would detect it when you restart the networking service, however it’s not the case. This is something that I always forgot how to do for some reason, so today for all of us I decided the add this particular tip into this blog.
Let’s assume you have started your virtual machine and have added the bridged networking adapter to the virtual machine via the Virtual Box GUI. The first thing that you need to do is run the usual ifconfig command, then you’ll see the below screen. You’ll notice that the bridged network adapter that you added previously did not appear!
Making the Bridged Networking Appear
The first thing that we need to do is to find out the interface name using ifconfig -a. So run the command and look at the results. In my installation, the screen looks like the below screenshot:
In the highlighted area, you’ll notice the interface name eth1, which does not have any IP address. This is most likely the bridged networking interface, since there are only 2 networking interface in the VM. So take note of that eth1, we’ll use it shortly.
Next, open the file /etc/network/interface. Make sure you open it with sudo privilege so that you can save the changes. You’ll notice that you have both loopback and eth0 already there. What we need to do is simply add eth1 into this file, the configurations from eth1 would be just fine.
The last thing you need to do is to save the file and restart the VM, you will then have the bridged networking enabled for you.
ubuntu server, virtualbox