ElasticSearch: Allow only local requests

前端 未结 3 603
我在风中等你
我在风中等你 2020-12-23 09:36

How can allow only local requests for elasticsearch? So command like:

curl -XGET \'http://localhost:9200/twitter/_settings\'

can only be r

3条回答
  •  有刺的猬
    2020-12-23 10:12

    If your final goal is to deny any requests from outside the host machine, the most reliable way would be to modify the host's iptables so that it denies any incoming requests to the service ports used by ElasticSearch (9200-9300).

    If the end goal is to make sure that everyone refers to the service using an exclusive DNS, you're better off achieving this with an HTTP server that can proxy requests such as HTTPd or nginx.

提交回复
热议问题