title: Unable to connect to Node.js in Vagrant
body: <p>I am trying to set up a Node.js app using Vagrant. There is also a Rails app inside that very same Vagrant box, which works OK. Node is using port 3001, so here are the config settings in Vagrantfile:</p>
  
  <pre><code>  # Every Vagrant virtual environment requires a box to build off of.
    config.vm.box = "puppetlabs/ubuntu-14.04-32-puppet"
    config.vm.provision :shell, path: "bootstrap.sh"
    config.vm.network :forwarded_port, host: 4567, guest: 3000
    config.vm.network :forwarded_port, host: 5678, guest: 3001
  </code></pre>
  
  <p>So, I started Node in Vagrant box. This shows that inside the Vagrant box it responds to requests on port 3001:</p>
  
  <pre><code>vagrant@localhost:~$ wget 127.0.0.1:3001
  --2014-12-24 06:37:40--  http://127.0.0.1:3001/
  Connecting to 127.0.0.1:3001... connected.
  HTTP request sent, awaiting response... 200 OK
  </code></pre>
  
  <p>The guest machine is listening to port 3001:</p>
  
  <pre><code>$ sudo netstat -ltpn | grep 3001
  tcp        0      0 127.0.0.1:3001          0.0.0.0:*               LISTEN      1422/node
  </code></pre>
  
  <p>The host is listening to port 5678:</p>
  
  <pre><code>sudo netstat -ltpn | grep 5678
  tcp        0      0 0.0.0.0:5678            0.0.0.0:*               LISTEN      30966/VBoxHeadless
  </code></pre>
  
  <p>And yet, I can't connect to the app from the host browser.</p>
  
  <p>What can be the problem?</p>
  
  <p><strong>Updated:</strong> Output on <code>vagrant up</code>:</p>
  
  <pre><code>[default] Forwarding ports...
  [default] -- 22 =&gt; 2222 (adapter 1)
  [default] -- 3000 =&gt; 4567 (adapter 1)
  [default] -- 3001 =&gt; 5678 (adapter 1)
  </code></pre>