Skip to content

Set up Vagrant network bridge

Olin Davis edited this page Oct 20, 2015 · 3 revisions

Using vagrant we can configure the vm to bridge directly to your LAN. This way any device on the LAN can access the running VM.

  1. First find the VirtualBox bridges and names. VBoxManage list bridgedifs | grep ^Name
  2. In the vagrant file find the line where the current network is configured. It should start / look something like config.vm.network :private_network, ip: findip()
  3. Replace that line using your bridged connection: config.vm.network :public_network, :bridge => "en0: Ethernet"
  4. "en0: Ethernet" could be different for you. It is found in the first step.
  5. run: vagrant reload
  6. SSH into your vm and run ifconfig
  7. find the ip that relates to your bridged connection. This should be accessible from any device on the network.

Clone this wiki locally