Can’t connect to a Vagrant/VirtualBox virtual machine

networkingvagrantvirtualization

My ultimate goal is to install Puppet on a Vagrant CentOS box. The installer is tells me to connect to https://localhost:3000. My host is Windows.

To troubleshoot why I can't connect I started playing around with various options in Vagrant. I played around with the forwarding ports, bridged networking, and at this time I'm on host-only networking. So in my Vagrantfile I have this line:

config.vm.network "private_network", ip: "192.168.33.10"

In the VM I listen on port 8080 like so:

nc -l localhost 8080

From my Windows host I tried to telnet to the 8080 port using various IPs localhost and "192.168.33.10" but nothing works. I've disabled the Windows firewall, the CentOS iptables, everything that I can find on google.

I'm fairly new to networking, can I get some assistance how to troubleshoot this and make it work?

Best Answer

Don't pass a hostname when using the -l parameter with nc.

nc -l 8080 should do the trick.