ELK application running on my VM. Can I send a link to someone outside my network to access the localhost:5601 webpage?

I have ES, Logstasha nd Kibana running on my Virtual machine. I want to send a link accessible by someone outside my network to see the discover tab in Kibana I have running on localhost:5601. is it possible and how?

In past, I have tried ways that disturbed my pipeline setting and I want to avoid breaking everything i have been building by messing the port forwarding or something.

Are you running elk stack on docker or is it a standalone installation?

Also localhost or 127.0.0.1 is not routable on lan. Are your VMs on private network only available on your host or NAT/Bridged networking stack as your machine?

If its on NAT'ed network then you can forward your laptop port for kibana to the Kibana VM IP address. Anyone looking up your host_ip_addr:5601 should be able to see Kibana GUI as long as your host firewall allows.

If the VMs are on Bridged network, then they should be visible on the network just as your host is and anyone should be able to get to it.

Hi @sidhusaab,

It is a standalone installation.

I think its only available on my host. I am not sure what this question means? What should I check to answer this?

How to check I am on NAT'ed network?

How to forward kibana to kibana VM IP address? Is it just port forwarding?

What program are you using for virtualization? Vmware workstation, virtualbox, fusion etc?

In workstation it looks like this:

I am using oracle's VM VirtualBox Manager.

Are you able to confirm how the VM network is setup?

I would also say this - IMO, this is probably not the best way to host the application. If you can run it on cloud or on a server that people can publicly (within network) can access then explore that route. WIthout knowing too much about your laptop/desktop, you would be limited to resources and availability of the application.

@sidhusaab, When I go in Settings-> Network, It says "Attached to NAT" and a box with "Cable connected" is ticked off and option of Port Forwarding is below it.

Thanks for the advise! I will look into such options. In future I plan to host it on a server.

Should I follow this path and what is the step to forward my laptop port for kibana to kibana VM IP address?

Look up "port forwarding <insert_os_version>" and you'll be able to find steps on it. For example:

@sidhusaab, thanks for the link. But that is not for VMs but local systems.

So in port forwarding, what should be the Host Port? 5601? and guest IP should be what my VM's IP is? And guest port should be?

The port forwarding needs to be performed on your local system so that any incoming request to your laptop on port 5601 is forwarded to the VM's port 5061.

Switch --> Laptop:5601 -- Port Forward --> VM:5601

Here is a link that has more information. Scroll down a bit to the NAT'ing section to see Port Forwarding.

Also, this link can be useful:

http://www.virtualbox.org/manual/ch06.html#natforward

@sidhusaab, I tried to do port forwarding and added 10.0.2.xx as host ip, guest port as 22, and host port as 2281. But still kibana cant be seen. Kibana runs on localhost: 5601. So Am I adding the wrong port? should I add guest port too?

I did ifconfig and got the inet as 10.0.2.xx

@sidhusaab And these ways only add port open to forwarding. How do I still get out my kibana's link to someone outside network?

On your laptop's web browser, if you opened kibana via 10.0.2.x:5601 does it work?

Yes I can open 10.0.2.x:5601. But it doesnt have the same content as my actual localhost:5601 shows which is 127.0.x.x:5601. So should that be my guest IP?

@sidhusaab I was thinking of using port forwarding where traffic from VM is forwarded to host. So what should be in host Ip, host port, guest Ip and guest port?

Got it working! ports rae kibana's and host ip is local hosts ip and guest is Vm's ip.

Awesome, and apologies for not being able to respond yesterday.

Curious to know what link did you end up giving others so they could see the kibana UI?

I gave IP and kibana's port!