Options for controlling network access
You can authorize network access to your cluster by:- Adding an authorized range of public IP addresses.
- Setting up private connectivity so that inbound connections to your cluster from your cloud tenant are made over the cloud provider’s private network rather than over the public internet, for enhanced network security and reduced network latency. Available for CockroachDB Advanced and CockroachDB Standard. If you use IP allowlisting rules together with private connectivity, private networks do not need to be added to that allowlist.
- CockroachDB Advanced or Standard clusters deployed on GCP can connect privately using GCP Private Service Connect (PSC) or GCP VPC peering. PSC allows you to connect your cluster directly to a VPC within your Google Cloud project, while VPC Peering allows you to peer your cluster’s VPC in CockroachDB Cloud to a VPC within your Google Cloud project.
- CockroachDB Advanced or Standard clusters deployed on AWS can connect privately using AWS PrivateLink, which allows you to connect your cluster to a VPC within your AWS account. For CockroachDB Advanced clusters, the PrivateLink connection also provides access to the DB Console.
- CockroachDB Advanced clusters deployed on Azure can connect privately using Azure Private Link, which allows you to connect your cluster to a virtual network within your Azure tenant. The Private Link connection also provides access to the DB Console. For detailed instructions, refer to Establish private connectivity.
- You need to allowlist more defined IP address ranges than the default maximum.
- Your servers’ IP addresses are not static.
- You have a requirement to avoid exposing your cluster to the public internet.
Private clusters are not available for CockroachDB Advanced on Azure.
Cluster default network configuration
CockroachDB Advanced clusters differ from CockroachDB Standard clusters in their default network configuration:- On creation, a CockroachDB Standard cluster is open to all traffic as it is created with a
0.0.0.0/0IP allowlist entry. - On creation, a CockroachDB Advanced cluster is “locked down” and has no access until an authorized network is created.
IP allowlisting
Authorized network access can be managed from the CockroachDB Cloud console Network Authorization page at:https://cockroachlabs.cloud/cluster/{ your cluster UUID}/networking
Standard and Advanced clusters support different maximum numbers of IP allowlist rules:
If you need to add more than the maximum number of allowlist rules, contact Support.
While developing and testing your application, you may add
0.0.0.0/0 to the allowlist, which allows all networks. However, before moving into production, it is recommenced that you remove the 0.0.0.0/0 network from the allowlist.- Connect to a CockroachDB Basic Cluster: Authorize your network.
- Connect to a CockroachDB Advanced Cluster: Authorize your network.
DB Console
The DB Console provides details about a CockroachDB Advanced cluster’s configuration, and helps you optimize cluster performance. The DB Console is not available on CockroachDB Standard or Basic.Users must have the Cluster Developer, Cluster Operator, Cluster Admin, Cluster Data Accessor, or Cluster Creator role on a specific cluster to access its DB Console. Refer to Organization user roles
- Over private connectivity, if your cluster is deployed on AWS or Azure and you have set up AWS PrivateLink or Azure Private Link. No IP allowlist entry is required.
- Over the public internet, after you add your current IP address to the cluster’s IP allowlist.
https://admin-{cluster-name}.crdb.io:8080. Replace the placeholder with the name of your cluster. Always connect using this hostname, and do not hardcode the IP addresses that it resolves to. The IP addresses of the load balancers that serve a cluster’s SQL and DB Console traffic can change.
Access the DB Console over private connectivity
For CockroachDB Advanced clusters on AWS and Azure, DB Console traffic uses the same per-region load balancer and private endpoint as SQL traffic. After you establish private connectivity, you can open the DB Console on port 8080 from a host in the connected VPC or virtual network without adding an IP allowlist entry.- AWS PrivateLink: The security group for your VPC endpoint must allow inbound traffic on port 8080 in addition to port 26257. Refer to Create an AWS endpoint.
- Azure Private Link: The DB Console is reachable through the private endpoint on port 8080. Its TLS certificate covers both the
admin-{cluster-name}.crdb.iohostname and the private endpoint’s Internal DNS Name, so you can use whichever name your private DNS configuration resolves to the private endpoint.
Some CockroachDB Advanced clusters on AWS that were created before August 2024 do not support DB Console access over AWS PrivateLink. If you cannot reach the DB Console over your PrivateLink connection, access it over the public internet or contact Support.
Access the DB Console over the public internet
To access the DB Console over the public internet, you must first authorize your current IP address:-
Visit your cluster’s IP allowlist page:
- Click Add Network.
-
Add your Current Network:
- Give it a Name indicating its use for DB Console access from your current location.
- Under Allow this network to access, select DB Console to monitor the cluster.
- Click Apply.
When you have finished your work with the DB Console, it is recommended to remove your authorized network from the allowlist, in the interest of the general best practice of restricting network access as much as possible.Remove an authorized network by selecting Delete from the Action dropdown its row on the the cluster’s Networking page.
- Navigate to your CockroachDB Advanced cluster’s Tools page in the Monitoring section of the CockroachDB Cloud Console.
- Click Open DB Console. Your browser will attempt to access the DB console in a new tab.
https://admin-{cluster-name}.crdb.io:8080/#/metrics/overview/cluster. Replace the placeholder with the name of your cluster.
