I have the following Vagrantfile:

    Vagrant.configure("2") do |config|
      config.vm.box = "bento/ubuntu-18.04"
      config.vm.network "forwarded_port", guest: 4200, host: 4200
    end

That is, super simple Ubuntu 18.04 and I will be running a web service on 
it that uses port 4200. I want to be able to go to *http://localhost:4200* on 
a browser on my host machine and hit this service running inside the 
Vagrant box.

So I run *vagrant up && vagrant ssh* and I start the service, and I 
absolutely see it running. I can *curl http://127.0.0.1:4200* and get HTML 
output back in the response right there inside the VM.

But, back on my host, if I point my browser to http://localhost:4200 I get 
a "*The site can't be reached*" error. Is there anything in my Vagrantfile 
that would prevent port 4200 on the vagrant machine from forwarding to port 
4200 on my host?

Thanks!

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/6949a747-6e77-4ad4-8d69-885834f464f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to