Vagrant port forwarding question.

66 views
Skip to first unread message

maggy...@gmail.com

unread,
Dec 18, 2015, 3:22:05 PM12/18/15
to Vagrant
I run Vagrant in my OSX which brings up a Ubuntu VM and a consul cluster on the Ubuntu VM.

The firewall is turned off in the VM.

If I create a tunnel using vagrant like "vagrant ssh demo-vm -- -L 8500:127.0.0.1:8500" I am able to view the consul UI on my Mac like "http://localhost:8500/ui".

However I put the port forwarding in my Vagrantfile like:

config.vm.network "private_network", ip: "192.168.50.4"
config.vm.network :forwarded_port, guest: 8500, host: 8500

I am not able to see consul UI at: "http://localhost:8500/ui".

Any clues?

Thanks
Maggy

Alvaro Miranda Aguilera

unread,
Dec 18, 2015, 11:05:17 PM12/18/15
to vagra...@googlegroups.com
Hello

I use it in that way:

config.vm.network "forwarded_port", guest: 8500, host: 8500

can you add "-client 0.0.0.0 " to the consul line you use?

Thanks
Alvaro.
> --
> 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 vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/53a73dd6-c0ca-4036-af2c-686725fcee53%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages