freebsd host bridging internet to guests on virtualbox?


Active Member

Reaction score: 15
Messages: 173

How would I get internet working on my virtualbox host(s)?

I have followed the guides on the wiki and currently have Windows XP virtualized.

But I am unable to connect to the internet on it... my knowledge in networking is rather limited.

Here are my settings for the bridged connection ...

my ifconfig ...

re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
   ether b4:b5:2f:b9:c3:9c
   hwaddr b4:b5:2f:b9:c3:9c
   inet netmask 0xffffff00 broadcast
   media: Ethernet autoselect (1000baseT <full-duplex>)
   status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
   inet6 ::1 prefixlen 128
   inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
   inet netmask 0xff000000
   groups: lo
Running FreeBSD 11.1 amd64


Well-Known Member

Reaction score: 387
Messages: 388

For bridged, first you need to have vboxnetflt.ko and vboxnetadp.ko loaded in kernel:
21.6.1. Installing VirtualBox™.

If you've taken care of this already,
Give a look to ls -l /dev/vboxnetctl, if ownership and r/w permissions are not shared with the vboxusers group, change it accordingly, restart devfs and eventually restart vboxnet with doas service vboxnet restart.

Also, XP was shipped in 2001, I have never used it outside of school, but I do not think it comes with a driver for Intel 1000.
As opposite, PCnet-Fast III, which Virtualbox can emulate as well, is much better supported by legacy systems, it has even a packet driver for MS-DOS and Win9.x. So whether you use NAT or Bridged:

- you may want to switch to PCnet-Fast III as emulated device for the Host.

- Or if you really need Intel 1000, you can install the Vbox Guest Addtions, share a folder with your BSD host, download the E1000 driver for XP, put it in that folder, and install it from within the XP guest.

But aside from that, why would you ever need a bridged connection for a Win XP host? I doubt you need to remotely connect to that host, and in that case it is much better to use your FreeBSD desktop as an Home Server to share, store and remotely access your data, like some people here do.

If you do not need to remotely access the guest, I bet NAT with PCnet Fast would work just fine ;)

It's not a bad idea to look up the VirtualBox manual, Chaper 6. Virtual networking