Problems accessing HTTP applications using the IP of your Vagrant boxes?

I have three Vagrant boxes all provisioned from a single Vagrantfile. The HTTP apps where starting up fine and if I ssh in to the machine I could curl localhost:3000 and get the expected response.

However while the guest machines where up and pingable from the host I got no response from the HTTP port.

The problem it turns out is Ubuntu has the ufw firewall installed which blocks all incoming connections by default.

When provisioning the machine either disable the firewall or punch a hole in it for your ports:

sudo ufw disable
sudo ufw allow 3000/tcp

Here is a snippet from my Vagrantfile:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "ubuntu/trusty64"

  config.vm.define "jukebox" do |jb| "private_network", ip: ""
    jb.vm.hostname = ""

    $script = <<-SCRIPT

    sudo ufw allow 3000/tcp

    # ...


    jb.vm.provision "shell", inline: $script