Disabling unused ports

Transport port is used for node to node communication. If you have just one node, then you can bind to 127.0.0.1:9300 by using transport.bind_host.

https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html

Otherwise you can block the port using iptables.