Access localhost:XXXX from host machine

Hi @ all,

I’ve installed Elasticsearch, Kibana and Zammad on my guest machine (trellis/vagrant) for testing purposes. They’re all running as expected and each ist available on the guest using the port numbers with localhost (e.g. http://localhost:3000).
Now I want to access the web interfaces from my host machine (MacOS= and already tried to edit the hosts directing to the server as well as port forwarding in VirtualBox. However I’m not able to access them from my host and I’m wondering how I could set up trellis and host to allow the access.

It would be great if someone has an idea!

Best regards,


Might need to configure ferm/iptables, see

Dear @ben,
thank you very much for you answer. As far as I understood Ferm allows me to open some ports on the VM. Correct? But now my understanding ends already. Just tried to add the following to trellis/group_vars/development/main.yml:

  - type: "dport_accept"
    dport: ["http", "https", "3000", "5001"]
    filename: "nginx_accept"

But the behavior keeps the same. So I’m not sure whether the above is correct and whether it needs any more action such as port forwarding in VirtualBox,

I really appreciate you help!


Hi @ben, really sorry for bumping this. A hint would be very helpful for me.

Thank you!

EDIT: I found another suitable solution. Thank you very much anyway.

What was the solution? Others coming to this thread would probably appreciate an answer :smiley:

Yes, you’re absolutely right. Just wanted to figure out that everything works fine before summarizing an untrue story. :slight_smile:

My setup is that I installed the Elasticsearch and Zammad ansible playbooks within Trellis. Latter is an amazing multi-channel support (ticketing-) system which get’s the best out of it in relation of ES. I installed it a couple of months already and somehow was able to access Zammad frontend via adding some lines in hosts in the host system. However I didn’t take a note and wasn’t able to reproduce what I did - What took me a couple of days. ::scream_cat:

To be honest and to make a long story short: All I did now is editing the Zammad settings as described in Step 4 here:

In order to allow users to remotely access Zammad, you need to modify the Zammad Nginx configuration file.
sudo vi /etc/nginx/sites-available/zammad.conf
Find the line.
server_name localhost;
Replace localhost with the FQDN of your server instance.

I absolutely didn’t expect that the setup (and host machine) just recognizes the URL to be part of the VM and correctly links to that. And to be honest I still don’t get how that comes but I guess that the nginx config is recognized and correctly set up on the host machine.
Not sure whether that helps someone… :joy:

In terms of Ferm/iptables a restart of the machine isn’t enough. You need re provision the machine again. I think that would be a good hint in the docs as well as which files should be used to set the iptables. Using development/main.yml and vagrant provision did the trick for me but as said I removed that and just changed the settings.

Thanks again and best regards,


1 Like