Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've setup a local virtual machine (ubuntu 12.4) using Vagrant (www.vagrantup.com) and need to share its resources on my local wifi network. It is basically running a webserver which should be accessible by other machines on the local network.

My local wifi adapter gets a dynamic IP address from a router.

My current config looks like this, but i cannot access the machine from another machine using the IP:

config.vm.network :private_network, ip: "192.168.56.101"
    config.vm.network :forwarded_port, guest: 80, host: 8080

How can I make this happen? Any help is highly appreciated!

share|improve this question

1 Answer 1

The private_network is a network that is only between your host and the guest vm. If you want to make the guest vm available to others systems on the same network as your host you need to use the "public_network" setup in vagrant. This will allow your guest to get/use an IP address on the network that your host is on.

config.vm.network "public_network"

http://docs.vagrantup.com/v2/networking/public_network.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.