Search code examples
elasticsearchelasticsearch-x-pack

Elasticsearch search request restrict to only certain server IPs


Is it possible to create a filter of some sort in elasticsearch, such that the search request will be honored only if the request is from trusted IP (certain servers only).

I referred to this post however, would like to check if the latest versions has this feature, i couldn't find anything in the elastic document.

Note: i have a more then 1 elastic server in the cluster.


Solution

  • Sure, the network module is what you are looking for.

    There are two kind of networks in elasticsearch clusters:

    1. Transport: Communication between the nodes of the cluster
    2. Http: Communication with all kind of clients

    If you want to restrict searches to serveral IPs please have a look on xpack.security.http.filter.* settings.

    A brief documentation of this feature is available here.