如何仅允许来自 ips/domains 列表的 elasticsearch 请求
How to allow requests to elasticsearch only from a list of ips/domains
我阅读了文档,但无法使其正常工作。
我有一台服务器,其中包含 elasticsearch 和查询它的外部服务器。到目前为止,我可以从任何 ip 访问 elasticsearch。
示例:
elasticsearchserver的publicip:port:123.123.123.123:9200
我有域:anothersocialnetwork.com 和 anothersocialnetwork2.com
我只希望它们和 localhost 能够查询 elasticsearch 服务器。
非常感谢
有多种方法可以实现这一点。我想提出的建议如下 -
- 运行 本地主机界面中的 Elasticsearch network.host 作为 elasticsearch.yml 文件中的本地主机。
- 现在只有localhost中的应用程序可以访问该应用程序
- 放置一个像 nginx 或 apache 这样的代理,这个代理就可以访问 elasticsearch。现在将您要在代理中访问 Elasticsearch 的 IP 列入白名单。
也可以看看Elasticsearch jetty plugin。它有一些安全配置。但我不确定它是否积极发展。
也在 security Elasticsearch , i would recommend to go through this blog.
我阅读了文档,但无法使其正常工作。
我有一台服务器,其中包含 elasticsearch 和查询它的外部服务器。到目前为止,我可以从任何 ip 访问 elasticsearch。
示例:
elasticsearchserver的publicip:port:123.123.123.123:9200 我有域:anothersocialnetwork.com 和 anothersocialnetwork2.com
我只希望它们和 localhost 能够查询 elasticsearch 服务器。
非常感谢
有多种方法可以实现这一点。我想提出的建议如下 -
- 运行 本地主机界面中的 Elasticsearch network.host 作为 elasticsearch.yml 文件中的本地主机。
- 现在只有localhost中的应用程序可以访问该应用程序
- 放置一个像 nginx 或 apache 这样的代理,这个代理就可以访问 elasticsearch。现在将您要在代理中访问 Elasticsearch 的 IP 列入白名单。
也可以看看Elasticsearch jetty plugin。它有一些安全配置。但我不确定它是否积极发展。
也在 security Elasticsearch , i would recommend to go through this blog.