|

Adding Virtual Box Bridged Network Adapter to Laravel Homestead

Vagrant allows you to configure bridged network adapter, so your vagrant(homestead) box can be seen on local network.  I order to make this possible by adding a line of code to homestear.rb script in scripts folder. I opted to add this line after the following code.

25
26
27
28
29
 if settings.has_key?("networks")
            settings["networks"].each do |network|
                config.vm.network network["type"], ip: network["ip"], bridge: network["bridge"] ||= nil
            end
        end
31
  config.vm.network "public_network", ip: "192.168.0.90", bridge: "Intel(R) Dual Band Wireless-AC 3165"

Use the IP addresses that are not in the pool of dynamically assigned addresses for you router to avoid collisions.
For the bridge use your host’s specific controller (You can look it up in Virtual Box Network settings).

Share this article

Similar Posts