# Connect to ElasticServer from Behind Proxy

**URL:** <https://discuss.elastic.co/t/connect-to-elasticserver-from-behind-proxy/49301>\
**Category:** Elasticsearch\
**Created:** [May 5, 2016, 2:06pm UTC](https://discuss.elastic.co/t/connect-to-elasticserver-from-behind-proxy/49301 "2016-05-05T14:06:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pravinrane32](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pravinrane32](https://discuss.elastic.co/u/pravinrane32)\
**Post date:** [May 5, 2016, 2:06pm UTC](https://discuss.elastic.co/t/connect-to-elasticserver-from-behind-proxy/49301/1 "2016-05-05T14:06:45Z")

</div>

Hi,

I have elastic instance sitting in the cloud. I need to connect to elastic instance from the application which is sitting behind the proxy.

I am using the Java Client to connect to elastic. Going through Transport client documentation, i could only infer that it needs the ip address of host and does not have any explicit api to specify proxy for connection.

Client client = TransportClient.builder().build()  
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300));

Could you please guide me on how to achieve this?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 14, 2016, 3:45pm UTC](https://discuss.elastic.co/t/connect-to-elasticserver-from-behind-proxy/49301/2 "2016-05-14T15:45:27Z")

</div>

Do you need to funnel the traffic through a SOCKS proxy?

---

<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, 10:51pm UTC](https://discuss.elastic.co/t/connect-to-elasticserver-from-behind-proxy/49301/3 "2017-07-05T22:51:25Z")

</div>


