I'm using a Centos VM hosted on OSX using Vagrant and cannot seem to connect to Node.js running on the guest Centos machine.
I have installed both Nginx and Node.js and have forwarded ports from the host to the guest for both of them.
config.vm.network :forwarded_port, guest: 8080, host: 8080 config.vm.network :forwarded_port, guest: 8124, host: 8124
After starting Node.js I can access it locally within the virtual machine by 'wget 127.0.0.1:8124' but from the host machine that doesn't work.
I can access the Nginx instance on port 8080 from the host machine without problem. Although I'm planning to run the Node.js on port 8124, stopping Nginx and then running Node.js on port 8080 (which is definitely being forwarded to the Centos VM) still doesn't work.
I have stopped the Iptables service so don't think that would be blocking any requests.
What do I need to do to make Node.js accept requests from the host machine when it is running in the Centos guest VM?
The Node script I'm running is https://github.com/guzzle/guzzle/blob/master/tests/Guzzle/Tests/Http/server.js however I don't think that's relevant as the requests are reaching the node server.