can you first try to disable all firewalls and see if that works? Apart from that, does it work with telnet/netcat/nmap? Also, every node in the cluster needs to be able to connect to every other node to port 9300, is that part of your firewall rules? That input rule also takes the bidirectional nature of tcp packets into account (my iptables times are long gone, thus the stupid questions).
Also, the first config contains :9300 is node setting? is that intended? On top of that you also have to change minimum master nodes setting, when you have two nodes, but first the should of course connect to each other.
I don't think it's problem with iptables. After i change the configuration from network.publish_host to network.host. But when I change the configuration my elasticsearch API open to all IPs using <node-ip>:9200. So there is no use of Nginx.
Then I create one more rule that allows only the current node API to access elasticsearch API, not others. And I use the Nginx to port forward from :8000 (Nginx port) to :9200. Now it's working fine.
Is there any other thing I have to consider for security reasons. And thanks for your response
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.