Page 1 of 1

How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu

Posted: 11. Jan 2017, 17:08
by llIlllIlllIllIl
Hi everyone,
My main OS upon which virtualbox is installed is a *nix laptop. On virtualbox,I have two virtual machines, one is CentOS, the other is a Ubuntu box. I have created with brctl a bridge on CentOS called br0, I have added the interface enp0s3 to it (my ethernet interface), and CentOS is connected (in virtualbox) in bridged mode AND in internal mode (internal-network is the name of the network) with to my ethernet cable. Ubuntu is, anyway, connected ONLY in internal network (with internal-network as the name of the network). And it does not connect (i.e. no network connection at all, ping refuses to work).

I want the two virtual machines to be connected. Ubuntu should connect through the bridge on CentOS and eventually, I wish to create a proxy on CentOS to block a website on Ubuntu, hence the two vm must be connected. Here is the output of my brctl show on CentOS

Code: Select all

bridge name  bridge id  STP enabled   interfaces
virbr0       8000--etc   yes          virbr0-nic
br0          8000--etc   no           enp0s3
Any advices? Thanks.

Re: How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu

Posted: 11. Jan 2017, 17:15
by mpack
Why do you need a bridge? Just create a local (virtual) network and make sure that both VMs are connected to it.

Moved to "Linux Guests".

Re: How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu

Posted: 11. Jan 2017, 17:16
by llIlllIlllIllIl
That's the purpose of my assignment, I have to do this in this way. It this even possible?

Re: How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu

Posted: 11. Jan 2017, 17:19
by mpack
You can do pretty much anything with a VM that you can do with a physical PC, so naturally it's possible, but that discussion is not within the scope of these forums. Just make sure that both VMs are on one network, which can be local, NAT network, or bridged (the latter having nothing to do with the bridge feature of your OS).

Re: How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu

Posted: 11. Jan 2017, 17:21
by llIlllIlllIllIl
Where should I ask, on which forum? Thanks.

Re: How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu

Posted: 11. Jan 2017, 17:29
by socratis
I will point you to the answer given to you by BillG in the last question you had:
BillG wrote:Before you can emulate a network setup with virtual machines and networks, you need to know how to do it with physical ones. Then work out how to emulate that setup.