# Not able to connect to Kibana from any IP other than localhost loopback address

**URL:** https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207
**Category:** Kibana
**Created:** [April 8, 2020, 8:38pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207 "2020-04-08T20:38:56Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![mneely](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mneely](https://discuss.elastic.co/u/mneely)
#### Post date: [April 8, 2020, 8:38pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/1 "2020-04-08T20:38:56Z")

</div>

Hello, I am able to connect to [http://localhost:5601](http://localhost:5601) on my ubuntu 18.04 machine that is running docker and the ELK stack, but not able to connect to my Ethernet IP.

```
mneely@umbrella-kibana:~$ curl -i http://localhost:5601
HTTP/1.1 302 Found
location: /app/kibana
kbn-name: kibana
kbn-xpack-sig: 6ac3af7a9155783217983f0fb9fc6b6b
content-type: text/html; charset=utf-8
cache-control: no-cache
content-length: 0
connection: close
Date: Wed, 08 Apr 2020 20:28:23 GMT

```

> mneely@umbrella-kibana:~$ curl -i [http://172.18.3.253:5601](http://172.18.3.253:5601)  
> curl: (7) Failed to connect to 172.18.3.253 port 5601: Connection refused  
> mneely@umbrella-kibana:~$

> mneely@umbrella-kibana:~$ ifconfig  
> \> docker0: flags=4099\<UP,BROADCAST,MULTICAST\> mtu 1500  
> \> inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255  
> \> ether 02:42:bb:9e:ff:dd txqueuelen 0 (Ethernet)  
> \> RX packets 0 bytes 0 (0.0 B)  
> \> RX errors 0 dropped 0 overruns 0 frame 0  
> \> TX packets 0 bytes 0 (0.0 B)  
> \> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0  
> \>  
> \> ens160: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
> \> inet 172.18.3.253 netmask 255.255.252.0 broadcast 172.18.3.255  
> \> inet6 fe80::250:56ff:feb2:d86b prefixlen 64 scopeid 0x20  
> \> ether 00:50:56:b2:d8:6b txqueuelen 1000 (Ethernet)  
> \> RX packets 64435 bytes 90229013 (90.2 MB)  
> \> RX errors 0 dropped 0 overruns 0 frame 0  
> \> TX packets 21423 bytes 1712637 (1.7 MB)  
> \> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0  
> \>  
> \> flannel.1: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1450  
> \> inet 10.1.66.0 netmask 255.255.255.255 broadcast 0.0.0.0  
> \> inet6 fe80::c822:9ff:fe93:90b prefixlen 64 scopeid 0x20  
> \> ether ca:22:09:93:09:0b txqueuelen 0 (Ethernet)  
> \> RX packets 0 bytes 0 (0.0 B)  
> \> RX errors 0 dropped 0 overruns 0 frame 0  
> \> TX packets 0 bytes 0 (0.0 B)  
> \> TX errors 0 dropped 14 overruns 0 carrier 0 collisions 0  
> \>  
> \> lo: flags=73\<UP,LOOPBACK,RUNNING\> mtu 65536  
> \> inet 127.0.0.1 netmask 255.0.0.0'

```
---
## Default Kibana configuration from kibana-docker.
## from https://github.com/elastic/kibana-docker/blob/master/build/kibana/config/kibana.yml
#
server.name: kibana
server.host: "0.0.0.0"
elasticsearch.url: http://localhost:9200
server.port: 5601
logging.dest: /var/log/kibana/kibana.log

```

> mneely@umbrella-kibana:~$ sudo ufw status  
> Status: inactive

Netstat shows only listening on port 5601, so I imagine that is the problem but I have no idea what is missing to allow me to bind to my ethernet interface.

> mneely@umbrella-kibana:~$ netstat -anp | grep 5601  
> (Not all processes could be identified, non-owned process info  
> will not be shown, you would have to be root to see it all.)  
> tcp 0 0 127.0.0.1:5601 0.0.0.0:\* LISTEN -  
> tcp 0 0 127.0.0.1:57530 127.0.0.1:5601 TIME\_WAIT -

---

<div class="post-metadata">

### Author: ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)
#### Post date: [April 9, 2020, 5:33am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/2 "2020-04-09T05:33:26Z")

</div>

Modify the [network.host](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings) setting in kibana.yml could change the listen address.

**[Update] This is for Elasticsearch; check the next comment below for Kibana's**

---

<div class="post-metadata">

### Author: ![mneely](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mneely](https://discuss.elastic.co/u/mneely)
#### Post date: [April 9, 2020, 6:31am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/3 "2020-04-09T06:31:05Z")

</div>

No such luck.

My understanding is that the network.host settings does the trick for elasticsearch (which I do have it set to 0.0.0.0) but not a factor in kibana.yml file.

---

<div class="post-metadata">

### Author: ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)
#### Post date: [April 9, 2020, 6:35am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/4 "2020-04-09T06:35:31Z")

</div>

Oh my mistake

It should be `server.host` setting in Kibana.  
You can search for it in [Configuring Kibana](https://www.elastic.co/guide/en/kibana/current/settings.html)

---

<div class="post-metadata">

### Author: ![mneely](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mneely](https://discuss.elastic.co/u/mneely)
#### Post date: [April 9, 2020, 6:38am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/5 "2020-04-09T06:38:26Z")

</div>

Yes, that's set. See my kibana.yml in the 4th text block in my original question.

---

<div class="post-metadata">

### Author: ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)
#### Post date: [April 9, 2020, 6:44am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/6 "2020-04-09T06:44:12Z")

</div>

Can you paste the command you used for running the containers?

If the kibana instance runs in a container in bridge mode, it wouldn't be able to connect to Elasticsearch through [http://localhost:9200](http://localhost:9200)

---

<div class="post-metadata">

### Author: ![mneely](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mneely](https://discuss.elastic.co/u/mneely)
#### Post date: [April 9, 2020, 6:59am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/7 "2020-04-09T06:59:11Z")

</div>

I am not sure what you mean by the command to run the containers?

I am able to connect to the elasticsearch itself from the VM I am running the ELK stack on.

mneely@umbrella-kibana:~$ curl -i [http://localhost:9200](http://localhost:9200)  
HTTP/1.1 200 OK  
content-type: application/json; charset=UTF-8  
content-length: 493

{  
"name" : "IybWIcl",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "WsLLXk1WQs2a2T0-qWAMRg",  
"version" : {  
"number" : "6.8.8",  
"build\_flavor" : "default",  
"build\_type" : "deb",  
"build\_hash" : "2f4c224",  
"build\_date" : "2020-03-18T23:22:18.622755Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.7.2",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}  
mneely@umbrella-kibana:~$

A little about my setup - I'm running this on ubuntu 18.04 with docker, and the ELK stack installed.

Here is my network config -

mneely@umbrella-kibana:~$ ifconfig  
docker0: flags=4099\<UP,BROADCAST,MULTICAST\> mtu 1500  
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255  
ether 02:42:34:85:17:45 txqueuelen 0 (Ethernet)  
RX packets 0 bytes 0 (0.0 B)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 0 bytes 0 (0.0 B)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens160: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet 172.18.3.253 netmask 255.255.252.0 broadcast 172.18.3.255  
inet6 fe80::250:56ff:feb2:d86b prefixlen 64 scopeid 0x20  
ether 00:50:56:b2:d8:6b txqueuelen 1000 (Ethernet)  
RX packets 4714 bytes 476766 (476.7 KB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 713 bytes 93528 (93.5 KB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

flannel.1: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1450  
inet 10.1.66.0 netmask 255.255.255.255 broadcast 0.0.0.0  
inet6 fe80::485f:82ff:feb1:5b1 prefixlen 64 scopeid 0x20  
ether 4a:5f:82:b1:05:b1 txqueuelen 0 (Ethernet)  
RX packets 0 bytes 0 (0.0 B)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 0 bytes 0 (0.0 B)  
TX errors 0 dropped 15 overruns 0 carrier 0 collisions 0

lo: flags=73\<UP,LOOPBACK,RUNNING\> mtu 65536  
inet 127.0.0.1 netmask 255.0.0.0  
inet6 ::1 prefixlen 128 scopeid 0x10  
loop txqueuelen 1000 (Local Loopback)  
RX packets 438791 bytes 80577427 (80.5 MB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 438791 bytes 80577427 (80.5 MB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

---

<div class="post-metadata">

### Author: ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)
#### Post date: [April 9, 2020, 7:29am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/8 "2020-04-09T07:29:50Z")

</div>

Did you installed Elasticsearch and Kibana as a system service (e.g. `apt-get install kibana`)?  
If yes, could you make sure that the configuration file is the one you modified? Use the command `systemctl cat kibana` to show your kibana parameters, mine has `ExecStart=/usr/share/kibana/bin/kibana "-c /etc/kibana/kibana.yml"`

Also, could you search for the string `"message":"http server running at http://` in the kibana log file `/var/log/kibana/kibana.log`? Mine which listens to 0.0.0.0 will have the message `"message":"http server running at http://0.0.0.0:5601"` logged

---

<div class="post-metadata">

### Author: ![mneely](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mneely](https://discuss.elastic.co/u/mneely)
#### Post date: [April 9, 2020, 4:14pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/9 "2020-04-09T16:14:11Z")

</div>

Wow, that's it.

ExecStart=/usr/share/kibana/bin/kibana "-c /etc/kibana/kibana.yml"

And my logs never worked because I have edited the yml file in my local directory to setup logging versus the above. Do you recommend changing the kibana parameters to point to my local yml file or to just edit the yml files the apt install created?

---

<div class="post-metadata">

### Author: ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)
#### Post date: [April 9, 2020, 4:27pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/10 "2020-04-09T16:27:19Z")

</div>

> [@mneely](#):
>
> Do you recommend changing the kibana parameters to point to my local yml file or to just edit the yml files the apt install created?

Usually we will backup the original configuration file to something like `/etc/kibana/kibana.yml.bak` and just edit the file `/etc/kibana/kibana.yml`, so that when you screw up the configuration file, you can have something to revert with.

---

<div class="post-metadata">

### Author: ![mneely](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mneely](https://discuss.elastic.co/u/mneely)
#### Post date: [April 9, 2020, 7:57pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/11 "2020-04-09T19:57:47Z")

</div>

This got it working. Thank you for your help!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 7, 2020, 7:57pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-kibana-from-any-ip-other-than-localhost-loopback-address/227207/12 "2020-05-07T19:57:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
