# Access Elasticsearch 2.2 outside not work on iPad/iPhone

**URL:** <https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354>\
**Category:** Elasticsearch\
**Created:** [March 24, 2016, 2:18pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354 "2016-03-24T14:18:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nos2016](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@Nos2016](https://discuss.elastic.co/u/Nos2016)\
**Post date:** [March 24, 2016, 2:18pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/1 "2016-03-24T14:18:00Z")

</div>

Hi,

I installed Elasticsearch 2.2 on VPS Debian.  
I configured network.host to 0.0.0.0 in elasticsearch.yml file.  
I created a web site where I connect to elasticsearch to get data.  
It works on Desktop but I received this error Can't connect to server on iPad or iPhone.  
I don't understand why it works on Desktop and not on mobile devices.  
If someone can help me ?

Best regards,

JC

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 24, 2016, 2:26pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/2 "2016-03-24T14:26:34Z")

</div>

Can you access any other web service on the VPS from the iPad / iPhone? Is it only Elasticsearch?

---

<div class="post-metadata">

**Author:** ![Nos2016](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@Nos2016](https://discuss.elastic.co/u/Nos2016)\
**Post date:** [March 24, 2016, 4:49pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/3 "2016-03-24T16:49:36Z")

</div>

The weird thing is it works on my personal iPhone but not on my other devices like my iPad Mini.  
In my elasticsearch.yml, I have this

network.host: 0.0.0.0  
index.number\_of\_replicas: 0  
http.cors.enabled : true  
http.cors.allow-origin : "\*"  
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE  
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length  
http.jsonp.enable: true  
index.mapper.dynamic: false

I think I don't use any other web service yet on my VPS.

---

<div class="post-metadata">

**Author:** ![Nos2016](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@Nos2016](https://discuss.elastic.co/u/Nos2016)\
**Post date:** [March 24, 2016, 4:53pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/4 "2016-03-24T16:53:22Z")

</div>

But before I upgrade my elasticsearch, I added only two IPs to access my cluster, my personal desktop IP on particular wifi and my personal iPhone IP on particular Wifi.  
My upgrade failed and I removed manually Elasticsearch to reinstall the last one.  
Maybe I didn't clean well elasticsearch and it always use my old configuration ? (However, my brother can access to the cluster on his personal desktop.)

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 24, 2016, 5:03pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/5 "2016-03-24T17:03:17Z")

</div>

Where did you add this two IPs?

---

<div class="post-metadata">

**Author:** ![Nos2016](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@Nos2016](https://discuss.elastic.co/u/Nos2016)\
**Post date:** [March 24, 2016, 5:05pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/6 "2016-03-24T17:05:36Z")

</div>

In my old elasticsearch.yml (before I install the new elasticsearch 2.2) in the network.bind\_host parameter

---

<div class="post-metadata">

**Author:** ![Nos2016](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@Nos2016](https://discuss.elastic.co/u/Nos2016)\
**Post date:** [March 24, 2016, 5:06pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/7 "2016-03-24T17:06:18Z")

</div>

But now I haven't it in the new configuration file under /etc/elasticsearch/elasticsearch.yml

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 24, 2016, 5:20pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/8 "2016-03-24T17:20:16Z")

</div>

> [@Nos2016](#):
>
> However, my brother can access to the cluster on his personal desktop.

Seems to be not related to an ES configuration issue then. Maybe just start a webserver on the VPS and check if you can connect to it with the iPad.

---

<div class="post-metadata">

**Author:** ![Nos2016](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@Nos2016](https://discuss.elastic.co/u/Nos2016)\
**Post date:** [March 29, 2016, 8:32am UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/9 "2016-03-29T08:32:53Z")

</div>

But I can access and see my angular website content so I can access to the vps no ?  
Web console just said "Failed to load resource: Could not connect to the server.  
" when I execute a search on my elasticsearch cluster.

---

<div class="post-metadata">

**Author:** ![JoarSvensson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joarsvensson/32/8740_2.png) [@JoarSvensson](https://discuss.elastic.co/u/JoarSvensson)\
**Post date:** [March 29, 2016, 10:58am UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/10 "2016-03-29T10:58:33Z")

</div>

You don't happen to have old rules set in the firewall (iptables) for the VPS?

`iptables --list` will list current firewall rules

I would suggest you control access through a reverse proxy such as Nginx or using the firewall instead of dealing with this in the Elasticsearch configuration directly. That kind of general access rules is better to control on server/OS level instead of in particular applications since you will have more options available and more control.

---

<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:** [July 5, 2017, 11:04pm UTC](https://discuss.elastic.co/t/access-elasticsearch-2-2-outside-not-work-on-ipad-iphone/45354/11 "2017-07-05T23:04:26Z")

</div>


