Setting IP filters
IP access lists filter traffic to ClickHouse services or API keys by specifying which source addresses are permitted to connect. These lists are configurable for each service and each API key. Lists can be configured during service or API key creation, or afterward.Prepare
Before you begin, collect the IP addresses or ranges that should be added to the access list. Take into consideration remote workers, on-call locations, VPNs, etc. The IP access list user interface accepts individual addresses and CIDR notation. Classless Inter-domain Routing (CIDR) notation, allows you to specify IP address ranges smaller than the traditional Class A, B, or C (8, 6, or 24) subnet mask sizes. ARIN and several other organizations provide CIDR calculators if you need one, and if you would like more information on CIDR notation, please see the Classless Inter-domain Routing (CIDR) RFC.Create or modify an IP access list
Applicable only to connections outside of PrivateLinkIP access lists only apply to connections from the public internet, outside of PrivateLink.
If you only want traffic from PrivateLink, set
DenyAll in IP Allow list.IP access list for ClickHouse services
IP access list for ClickHouse services
When you create a ClickHouse service, the default setting for the IP allow list is ‘Allow from anywhere.’From your ClickHouse Cloud services list select the service and then select Settings. Under the Security section, you will find the IP access list. Click on the Add IPs button.A sidebar will appear with options for you to configure:
- Allow incoming traffic from anywhere to the service
- Allow access from specific locations to the service
- Deny all access to the service
IP access list for API keys
IP access list for API keys
When you create an API key, the default setting for the IP allow list is ‘Allow from anywhere.’From the API key list, click the three dots next to the API key under the Actions column and select Edit. At the bottom of the screen you will find the IP access list and options to configure:
- Allow incoming traffic from anywhere to the service
- Allow access from specific locations to the service
- Deny all access to the service
Possible actions
- To add an additional entry you can use + Add new IP
London server:
- Delete an existing entry
- Edit an existing entry
- Switch to allow access from Anywhere
Verification
Once you create your filter confirm connectivity to a service from within the range, and confirm that connections from outside the permitted range are denied. A simplecurl command can be used to verify:
Attempt rejected from outside the allow list
Attempt permitted from inside the allow list
Limitations
- Currently, IP access lists support only IPv4