I found a simple solution for this. if you are using windows 10 then go to the network setting and turn off the automatic proxy detection.it solved my problem. I was looking for this for the last 2 days.
Elasticsearch listens for traffic from everywhere on port 9200. You will want to restrict outside access to your Elasticsearch instance to prevent outsiders from reading your data or shutting down your Elasticsearch cluster through its [REST API] ( _state_transfer). To restrict access and therefore increase security, find the line that specifies network.host, uncomment it, and replace its value with localhost so it reads like this:
We will now configure the firewall to allow access to the default Elasticsearch HTTP API port (TCP 9200) for the trusted remote host, generally the server you are using in a single-server setup, such as198.51.100.0. To allow access, type the following command:
I tried to open port 9200 to remote IP via UFW but as I try to connect from this IP with curl I am getting an error: connection refused. I am not sure but If elasticsearch.yml config file contains localhost it should not work. Ok so I added the IP to the config file but then systamctl restart elasicsearch fails. As I revert it back to localhost it works. How to allowe secure remote connection?
Like @dkayiwa mentioned, you should be able to access the :9200 url. Also, I it would be great if you could provide some additional info on as to what dev environment looks like (for ex: windows or linux).
df19127ead