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.

 if settings.has_key?("networks")
            settings["networks"].each do |network|
       network["type"], ip: network["ip"], bridge: network["bridge"] ||= nil
        end "public_network", ip: "", 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