Manage IP traffic filters in ECH or ECE
ECE Elastic Cloud Hosted
Traffic filtering, by IP address or CIDR block, is one of the security layers available in Elastic Cloud Enterprise and Elastic Cloud Hosted. It allows you to limit how your deployments can be accessed.
There are types of filters are available for filtering by IP address or CIDR block:
- Ingress or inbound IP filters: These restrict access to your deployments from a set of IP addresses or CIDR blocks. These filters are available through the UI.
- Egress or outbound IP filters (ECH only): These restrict the set of IP addresses or CIDR blocks accessible from your deployment. These might be used to restrict access to a certain region or service. This feature is in beta and is currently only available through the Traffic Filtering API.
Follow the step described here to set up ingress or inbound IP filters through the Elastic Cloud Console or Cloud UI.
To learn how traffic filter rules work together, refer to traffic filter rules.
To learn how to manage IP traffic filters using the Traffic Filtering API, refer to Manage traffic filters through the API.
To learn how to create IP traffic filters for self-managed clusters or Elastic Cloud on Kubernetes deployments, refer to Manage IP traffic filters in ECK and self-managed clusters.
ECE
On Elastic Cloud Enterprise, make sure your load balancer handles the X-Forwarded-For
header appropriately for HTTP requests to prevent IP address spoofing. Make sure the proxy protocol v2 is enabled for HTTP and transport protocols (9243 and 9343).
This step is not required in Elastic Cloud Hosted.
To apply an IP filter to a deployment, you must first create a rule set at the organization or platform level, and then apply the rule set to your deployment.
You can combine any rules into a set, so we recommend that you group rules according to what they allow, and make sure to label them accordingly. Since multiple sets can be applied to a deployment, you can be as granular in your sets as you feel is necessary.
To create a rule set:
Navigate to the traffic filters list:
- Log in to the Elastic Cloud Console.
- Find your deployment on the home page or on the Hosted deployments page, then select Manage to access its settings menus.
- Under the Features tab, open the Traffic filters page.
- Log into the Cloud UI.
- From the Platform menu, select Security.
Select Create filter.
Select IP filtering rule set.
Create your rule set, providing a meaningful name and description.
Select the region for the rule set.
Select if this rule set should be automatically attached to new deployments.
NoteEach rule set is bound to a particular region and can be only assigned to deployments in the same region.
Add one or more rules using IPv4, or a range of addresses with CIDR.
NoteDNS names are not supported in rules.
After you’ve created the rule set, you’ll need to associate IP filter rules with your deployment:
- Go to the deployment.
- On the Security page, under Traffic filters, select Apply filter.
- Choose the filter you want to apply and select Apply filter.
At this point, the traffic filter is active. You can remove or edit it at any time.
If you want to remove any traffic restrictions from a deployment or delete a rule set, you’ll need to remove any rule set associations first. To remove an association through the UI:
- Go to the deployment.
- On the Security page, under Traffic filters select Remove.
You can edit a rule set name or change the allowed traffic sources using IPv4, or a range of addresses with CIDR.
Navigate to the traffic filters list:
- Log in to the Elastic Cloud Console.
- Find your deployment on the home page or on the Hosted deployments page, then select Manage to access its settings menus.
- Under the Features tab, open the Traffic filters page.
- Log into the Cloud UI.
- From the Platform menu, select Security.
Find the rule set you want to edit.
Select the Edit icon.
If you need to remove a rule set, you must first remove any associations with deployments.
To delete a rule set with all its rules:
Navigate to the traffic filters list:
- Log in to the Elastic Cloud Console.
- Find your deployment on the home page or on the Hosted deployments page, then select Manage to access its settings menus.
- Under the Features tab, open the Traffic filters page.
- Log into the Cloud UI.
- From the Platform menu, select Security.
Find the rule set you want to edit.
Select the Delete icon. The icon is inactive if there are deployments assigned to the rule set.