OK, in the end my problem with port forwarding was the binding I was using in my test application. Interesting enough, it is a time now since I was using Vagrant and NodeJS every day, and it showed up in my confusion.

I did a little application to test why I wasn’t able to reach my guest server from my host machine. I tried changing the forwarded port number and enabled firewalls, but nothing happened. Initially I assumed that there was a problem between Vagrant and Ubuntu, then I tried with different OSs, different versions of Ubuntu, but there was no improvement.

Here is the code I used, blindly taken from the NodeJS page:

var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');

Then I tried using Apache as a test application and it worked fine. That removed Vagrant as the problem, but i wasn’t that sure about Ubuntu. I tried with the firewalls again, but no luck. Finally, after reading the same documentation again and again, I noticed the details about binding the NodeJS application. I was using localhost as the server, but I needed to replace it with 0.0.0.0 A second later, my test was passing, I slapped my face (because I read that, and have done it many times before), and I am now writing and heading to bed. It was frustrating, but I am happy in the end. Tomorrow I should be able to deploy Ghost properly, meanwhile, the little test is here:

var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, '0.0.0.0'); console.log('Server running at http://0.0.0.0:1337/');