---
title: Serverless compute firewall configuration
description: Configure firewalls so Databricks serverless compute can reach your S3, Azure storage, Google Cloud, and other firewalled resources.
canonical_url: https://docs.databricks.com/gcp/en/security/network/serverless-network-security/serverless-firewall-config
---

# Serverless compute firewall configuration

Databricks serverless compute connects to your cloud resources through managed network infrastructure. If firewalls protect your cloud resources, you must allow traffic from serverless compute. The configuration method depends on the type of resource:

* **Google Cloud resources**: Use [serverless project numbers](https://docs.databricks.com/gcp/en/security/network/serverless-network-security/serverless-firewall-config.md#configure-access-using-serverless-project-numbers) with VPC Service Controls (VPC-SC).

- **Other resources**: Allowlist the [outbound IP addresses](https://docs.databricks.com/gcp/en/security/network/serverless-network-security/serverless-firewall-config.md#outbound-ip-addresses-for-other-resources) published by Databricks.

A firewall controls which traffic your resources accept. To control which destinations serverless compute can reach, see [Manage network policies for serverless egress control](https://docs.databricks.com/gcp/en/security/network/serverless-network-security/manage-network-policies.md).

## <a id="configure-access-using-serverless-project-numbers" />Configure access using serverless project numbers

> [!NOTE]
> **Preview**
>
> This feature is in [Private Preview](https://docs.databricks.com/gcp/en/release-notes/release-types.md). To join this preview, contact your Databricks account team.

Google Cloud [VPC Service Controls (VPC-SC)](https://cloud.google.com/vpc-service-controls/docs/overview) are used to define service perimeters that create a security boundary around Google Cloud resources. Serverless project numbers enable you to create VPC-SCs between the Databricks serverless compute plane and your Google Cloud resources, such as GCS buckets. A VPC-SC ensures that only Databricks serverless compute projects can access your resources. For more information, contact your Databricks account team.

## <a id="outbound-ip-addresses-for-other-resources" />Configure access to other resources using outbound IP addresses

> [!IMPORTANT]
>
> The legacy list of stable IPs was decommissioned. If you use legacy IPs, migrate to the new method. See [Outbound IP addresses for serverless compute](https://docs.databricks.com/gcp/en/resources/ip-domain-region.md#gcp-serverless-outbound-ips). Until you migrate, serverless compute might return a `403 Forbidden` error when it tries to access your resources.

For resources other than Google Cloud resources, serverless compute uses public IP addresses to reach your resources.

To allow serverless to access resources with firewalls, you must add the CIDR blocks published by Databricks to your allowlist. For more information about published outbound IP addresses, see [Outbound IP addresses for serverless compute](https://docs.databricks.com/gcp/en/resources/ip-domain-region.md#gcp-serverless-outbound-ips).

### Find the outbound IP addresses for your environment

1. Download [`ip-ranges.json`](https://www.databricks.com/networking/v1/ip-ranges.json).
2. Filter the JSON to the entries that apply to your workspace. Keep only entries where:
   * `service` is `Databricks`
   * `type` is `outbound`
   * `region` matches your workspace region
   * `platform` matches `gcp`
3. Allowlist the `ipv4Prefixes` (CIDR blocks) from the matching entries in your resource firewall.

### <a id="automate-updates-to-keep-your-allowlist-current" />Automate updates to keep your allowlist current

You must automate updates to your allowlist. Databricks changes these IPs over time, so a static, one-time copy eventually breaks serverless connectivity. Updates publish as often as once every 30 days, new IPs become active as soon as 60 days after publication, and new regions are added periodically. To keep your allowlist current:

1. Fetch [`ip-ranges.json`](https://www.databricks.com/networking/v1/ip-ranges.json) on a schedule (for example, every 30 days).
2. Compare its `timestampSeconds` field against your saved copy to detect changes.
3. If it changed, check whether the IPs for your `platform` and `region` changed.
4. Update your firewall allowlist with any new IPs.
5. Save the file for the next comparison.

## Considerations

Review the following considerations before you configure a firewall for serverless compute:

* Configuring a firewall also affects connectivity from classic compute resources. You must also update your resource access rules to allow the IPs for connections from classic compute resources.
* Allow time for firewall rule propagation before testing connectivity from serverless compute.
* Serverless compute connects to your resources from IPv4 addresses. It can't connect to resources that are reachable only over IPv6.
