# Can the http port be closed/disabled if its not being used?

**URL:** <https://discuss.elastic.co/t/can-the-http-port-be-closed-disabled-if-its-not-being-used/6646>\
**Category:** Elasticsearch\
**Created:** [February 8, 2012, 7:39pm UTC](https://discuss.elastic.co/t/can-the-http-port-be-closed-disabled-if-its-not-being-used/6646 "2012-02-08T19:39:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeNereson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikenereson/32/2632_2.png) [@MikeNereson](https://discuss.elastic.co/u/MikeNereson)\
**Post date:** [February 8, 2012, 7:39pm UTC](https://discuss.elastic.co/t/can-the-http-port-be-closed-disabled-if-its-not-being-used/6646/1 "2012-02-08T19:39:55Z")

</div>

I've got a cluster of Es nodes on Ec2 in Aws.

I have java applications outside of Aws and inside of Aws communicating  
with the cluster via the Java TransportClient.

As I understand it, there are two ports. The http port and a tcp port. The  
http port is required to make REST based queries, and for  
elasticsearch-head access.

Does the java TransportClient use http or tcp?  
If the TransportClient uses tcp only, can I close or otherwise disable the  
http port and its functionality completely?  
Can the http port be closed/disabled if its not being used? Or is it being  
used in some other way that requires it to be open?

For security concerns, if we are not using the http access, we require to  
close the port.

Thanks.

~ Mike

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 8, 2012, 10:41pm UTC](https://discuss.elastic.co/t/can-the-http-port-be-closed-disabled-if-its-not-being-used/6646/2 "2012-02-08T22:41:21Z")

</div>

Yes, just set http.enabled to false.

On Wednesday, February 8, 2012 at 9:39 PM, MikeNereson wrote:

> I've got a cluster of Es nodes on Ec2 in Aws.
> 
> I have java applications outside of Aws and inside of Aws communicating with the cluster via the Java TransportClient.
> 
> As I understand it, there are two ports. The http port and a tcp port. The http port is required to make REST based queries, and for elasticsearch-head access.
> 
> Does the java TransportClient use http or tcp?  
> If the TransportClient uses tcp only, can I close or otherwise disable the http port and its functionality completely?  
> Can the http port be closed/disabled if its not being used? Or is it being used in some other way that requires it to be open?
> 
> For security concerns, if we are not using the http access, we require to close the port.
> 
> Thanks.
> 
> ~ Mike

---

<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 6, 2017, 3:40am UTC](https://discuss.elastic.co/t/can-the-http-port-be-closed-disabled-if-its-not-being-used/6646/3 "2017-07-06T03:40:02Z")

</div>


