Bucket IP filtering
This page provides an overview of bucket IP filtering including its benefits,
how it works, supported locations, and limitations to consider.
Overview
Cloud Storage offers bucket IP filtering to manage access to your data stored
in buckets.
Bucket IP filtering is a network security mechanism that restricts access to a
bucket based on the source IP address of the request and secures your data from
unauthorized access.
The bucket IP filtering feature for Cloud Storage enables fine-grained
access control based on IPv4 or IPv6 address ranges or the Trusted Cloud by S3NS
Virtual Private Cloud. You can configure a list of IP ranges at the bucket level and all
incoming requests to the bucket are restricted to the configured IP ranges and
VPCs. This feature provides a way to secure sensitive data in
Cloud Storage buckets and prevent unauthorized access from specific IP
addresses or VPCs.
Benefits
Bucket IP filtering for Cloud Storage offers the following benefits:
Fine-grained access control: Restrict access to your
Cloud Storage buckets based on the specific IP address (IPv4 or
IPv6) or Trusted Cloud by S3NS Virtual Private Cloud of the requester. Bucket IP filtering
acts as a strong network-level security layer, preventing unauthorized
access from unknown or untrusted sources.
Enhanced security: By limiting access to authorized IP addresses or
VPCs, you can reduce the risk of unauthorized access, data breaches, and
malicious activity.
Flexible configuration: You can configure and manage lists of IP ranges
at the bucket level, tailoring the access control to your specific
requirements.
How does it work?
Bucket IP filtering helps you control access to your buckets by defining rules that permit requests from specific IPv4 and IPv6 addresses. Incoming requests are evaluated against these rules to determine access permissions.
A bucket IP filtering rule includes the following configurations:
Public internet access: You can define rules to manage requests
originating from the public internet (outside any configured Virtual Private
Cloud). These rules specify allowed IPv4 or IPv6 addresses using CIDR
ranges, authorizing inbound traffic from those sources.
Virtual private cloud (VPC) access: For granular control over access
from specific VPC networks, you can define rules for each network.
These rules include allowed IP ranges, enabling precise management of access
from your virtual network infrastructure.
Service agent access: Trusted Cloud by S3NS service agents retain access to
buckets, even with an active IP filter configuration. You can set up a
configuration that allows Trusted Cloud by S3NS services such as BigLake,
Storage Insights, Vertex AI, and BigQuery to bypass the
IP filter validation when accessing your buckets.
Limitations
Bucket IP filtering has the following limitations:
Maximum number of IP CIDR blocks: You can specify a maximum of 200 IP
CIDR blocks across public and VPC networks in the IP
filter rule for a bucket.
Maximum number of VPC networks: You can specify a maximum of 25
VPC networks in the IP filter rules for a bucket.
Regional endpoints: Regional endpoints work with IP filtering only
when you use Private Service Connect.
IPv6 support: IP filtering with gRPC direct path is
not supported on an IPv4 VM. When you use IP filtering with
gRPC direct path, you must enable IPv6 support on
the VPC network.
Blocked Trusted Cloud by S3NS services: Enabling IP filtering on
Cloud Storage buckets restricts access for some Trusted Cloud by S3NS services, regardless of
whether they use a service agent to interact with Cloud Storage. For example, services such as
BigQuery use Cloud Storage for importing and exporting
data. To prevent service disruptions, we recommend not using IP filtering on Cloud Storage buckets accessed by the following services:
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Bucket IP filtering\n\nThis page provides an overview of bucket IP filtering including its benefits,\nhow it works, supported locations, and limitations to consider.\n\nOverview\n--------\n\nCloud Storage offers bucket IP filtering to manage access to your data stored\nin buckets.\n\nBucket IP filtering is a network security mechanism that restricts access to a\nbucket based on the source IP address of the request and secures your data from\nunauthorized access.\n\nThe bucket IP filtering feature for Cloud Storage enables fine-grained\naccess control based on IPv4 or IPv6 address ranges or the Google Cloud\nVirtual Private Cloud. You can configure a list of IP ranges at the bucket level and all\nincoming requests to the bucket are restricted to the configured IP ranges and\nVPCs. This feature provides a way to secure sensitive data in\nCloud Storage buckets and prevent unauthorized access from specific IP\naddresses or VPCs.\n\nBenefits\n--------\n\nBucket IP filtering for Cloud Storage offers the following benefits:\n\n- **Fine-grained access control**: Restrict access to your\n Cloud Storage buckets based on the specific IP address (IPv4 or\n IPv6) or Google Cloud Virtual Private Cloud of the requester. Bucket IP filtering\n acts as a strong network-level security layer, preventing unauthorized\n access from unknown or untrusted sources.\n\n- **Enhanced security**: By limiting access to authorized IP addresses or\n VPCs, you can reduce the risk of unauthorized access, data breaches, and\n malicious activity.\n\n- **Flexible configuration**: You can configure and manage lists of IP ranges\n at the bucket level, tailoring the access control to your specific\n requirements.\n\nHow does it work?\n-----------------\n\nBucket IP filtering helps you control access to your buckets by defining rules that permit requests from specific IPv4 and IPv6 addresses. Incoming requests are evaluated against these rules to determine access permissions.\n\nA bucket IP filtering rule includes the following configurations:\n\n- **Public internet access**: You can define rules to manage requests\n originating from the public internet (outside any configured Virtual Private\n Cloud). These rules specify allowed IPv4 or IPv6 addresses using CIDR\n ranges, authorizing inbound traffic from those sources.\n\n- **Virtual private cloud (VPC) access**: For granular control over access\n from specific VPC networks, you can define rules for each network.\n These rules include allowed IP ranges, enabling precise management of access\n from your virtual network infrastructure.\n\n- **Service agent access**: Google Cloud service agents retain access to\n buckets, even with an active IP filter configuration. You can set up a\n configuration that allows Google Cloud services such as BigLake,\n Storage Insights, Vertex AI, and BigQuery to bypass the\n IP filter validation when accessing your buckets.\n\nLimitations\n-----------\n\nBucket IP filtering has the following limitations:\n\n- **Maximum number of IP CIDR blocks**: You can specify a maximum of 200 IP\n CIDR blocks across public and VPC networks in the IP\n filter rule for a bucket.\n\n- **Maximum number of VPC networks**: You can specify a maximum of 25\n VPC networks in the IP filter rules for a bucket.\n\n- **Regional endpoints** : [Regional endpoints](/storage/docs/regional-endpoints) work with IP filtering only\n when you use [Private Service Connect](/vpc/docs/private-service-connect).\n\n- **IPv6 support** : IP filtering with gRPC direct path is\n not supported on an IPv4 VM. When you use IP filtering with\n gRPC direct path, you must enable [IPv6 support](/vpc/docs/ipv6-support) on\n the VPC network.\n\n- **Blocked Google Cloud services** : Enabling IP filtering on\n Cloud Storage buckets restricts access for some Google Cloud services, regardless of\n whether they use a [service agent](/iam/docs/service-agents) to interact with Cloud Storage. For example, services such as\n BigQuery use Cloud Storage for importing and exporting\n data. To prevent service disruptions, we recommend not using IP filtering on Cloud Storage buckets accessed by the following services:\n\n - BigQuery interactions with Cloud Storage:\n - [Load data](/bigquery/docs/loading-data-cloud-storage-csv) from Cloud Storage to BigQuery.\n - [Export table data](/bigquery/docs/exporting-data) from BigQuery to Cloud Storage.\n - [Export query results](/bigquery/docs/writing-results#downloading-saving-results-console) from BigQuery to Cloud Storage.\n - Query from an [external Cloud Storage table](/bigquery/docs/external-data-cloud-storage#query_external_tables) with BigQuery.\n - If your [App Engine applications access data in Cloud Storage](/appengine/docs/standard/using-cloud-storage), we recommend [using App Engine through a Virtual Private Cloud](/appengine/docs/legacy/standard/python/connecting-vpc).\n - IP filtering doesn't support Cloud Shell.\n\nWhat's next\n-----------\n\n- [Create IP filtering rules on a bucket](/storage/docs/create-ip-filter).\n- [Update the IP filtering rules on a bucket](/storage/docs/update-ip-filter).\n- [List the IP filtering rules on a bucket](/storage/docs/list-ip-filter).\n- [Disable the IP filtering rules on a bucket](/storage/docs/disable-ip-filtering).\n- [Bypass the IP filtering rules on a bucket](/storage/docs/bypass-ip-filter).\n\nTry it for yourself\n-------------------\n\n\nIf you're new to Google Cloud, create an account to evaluate how\nCloud Storage performs in real-world\nscenarios. New customers also get $300 in free credits to run, test, and\ndeploy workloads.\n[Try Cloud Storage free](https://console.cloud.google.com/freetrial)"]]