Solved Virtualbox no connectivity with bridged interface

Hello,

I'm trying to run FreeBSD in a vm using virtualbox. My host machine is an Acer Aspire 5735-4774 running FreeBSD 11.1-RELEASE amd64 with a GENERIC kernel. I have internet connectivity with my Atheros 9280 wireless card using the ath driver.

In the settings page for the vm I've setup a bridged interface via my wlan0 interface. When I boot up the vm however the dhcp client fails to lease an address. Even setting a static ip and default route fails to solve the issue.

I also tried running a debian linux vm with the same results So I figure the problem must either be with virtualbox itself or settings on my hosts FreeBSD.

Things I've tried

I have insured the vboxnet service is running as well as verifying the bridged interface settings. I also verified my hosts firewall is disabled.


Thank you for your time.

Your help is very much appreciated.
 
You cannot use a wireless interface for bridge, for security purpose packets cannot be sent to multiple MACs. Use NAT instead.

Hello again,

I successfully got virtualbox bridged networking to work using my wireless interface or my ethernet interface. All I had to do was compile the virtualbox-ose port and all it's dependencies from source.

Here's the steps I used to help someone in the future.

Note if you installed the src distribution set during the install you can safely skip to virtualbox-ose install instructions. Otherwise please start at the install src.txz

To install src.txz after the install

1. Open a shell and use sudo or su to become root

2. Use fetch to download the src.txz from freebsd.org the command will change slightly depending on if you use 32bit or 64bit. Use uname -a to find out, if the output is i386 your running 32bit and if it's amd64 your running 64bit.

if you use 64bit
fetch https://download.freebsd.org/ftp/releases/amd64/amd64/11.1-RELEASE/src.txz

if you use 32bit
fetch https://download.freebsd.org/ftp/releases/i386/11.1-RELEASE/src.txz

3. untar it with tar -C / -xzvf path/to/source/file/src.txz

Now here are the steps to compile virtualbox-ose please make sure you have done the steps above before following these otherwise the build will fail.

If you close the shell after step 5 open a new one and repeat step 1 then skip to step 4 and proceed as normal.

1. Become root either by sudo or su
2. run portsnap fetch
3. run portsnap extract (If you installed ports during the install substitute extract with update)
4. cd /usr/ports/emulators/virtualbox-ose/
5. run exec /usr/local/bin/bash (make sure to install bash first)
6. run export BATCH=yes (this avoids all the config dialog pages and accepts the defaults which are fine)
7. run make install clean
(Since you have to run make install clean as root after the installation you will get permission denied when trying to run virtualbox don't panic :):))
8. run chmod a+x /usr/local/lib/virtualbox/VirtualBox
9. run vi /etc/rc.conf and add vboxnet_enable="YES" at the bottom
10. run vi /boot/loader.conf and add vboxdrv_load="YES"
11. run reboot
12. run virtualbox from the shell as normal
13. enjoy the fruits of your labor :):):):)

My hardware
Model-Acer Aspire 5735-4774 laptop (yes it's almost ten years old lol)
cpu-Intel core 2 duo T7250 dual core running at 2Ghz
ram-1GB of ddr2
hard drive-160GB 5400rpm
os-FreeBSD 11.1 amd64

(My tips)
Have patience for me it took almost two days to compile all of virtualbox-ose and it's dependencies.

Make sure you install the source code with fetch before compiling if you don't it will fail quite aways through the build.

Don't be afraid to get your hands dirty it's open source for a reason so anyone can fix it:):
)
Search everywhere for the things you don't know or ask on the forums.

Most importantly above all else "Never give up, never back down!" (10 points if you know the movie:):):):))

Big thanks to this bugzilla post for the jump start I needed to fix the problem.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221050
 
Last edited:
Back
Top