Get IP filtering rules

This page describes how to get the IP filtering rules on a bucket. For information aboutbucket IP filtering, seeBucket IP filtering.

Required roles

To get the required permissions for getting the IP filtering rules on a bucket, ask your administrator to grant you the Storage Admin (roles/storage.admin)role on the bucket. This role contains the permissions required to get bucket IP filtering rules.

To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

  • storage.buckets.get
  • storage.buckets.getIpFilter

You can also get these permissions withcustom roles. You might be able to get these permissions with other predefined roles as well. To see which roles are associated with which permissions,refer toIAM roles for Cloud Storage.

For instructions on granting roles for projects, seeManage access toprojects.

Get bucket IP filtering rules

Console

To view IP filtering rules in the Google Cloud console, follow the instructions inList bucket IP filtering rules.The Google Cloud console displays all configured IP ranges and settings on a single page.

gcloud

  1. To get the IP filtering rules on a bucket, run the commandgcloudstorage buckets describe in your developmentenvironment:

    gcloud storage buckets describe gs://BUCKET_NAME --format="default(ip_filter_config)"

    Where:

    BUCKET_NAME is the name of your bucket. For example,my-bucket.

JSON API

  1. Have gcloud CLIinstalled and initialized, which lets you generate an access token for theAuthorization header.

  2. UsecURL to call theJSON API with aGET bucket request:

    curl -X GET \    -H "Authorization: Bearer $(gcloud auth print-access-token)" \    "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME"

    Where:

    BUCKET_NAME is the name of your bucket. For example,my-bucket.

What's next

Try it for yourself

If you're new to Google Cloud, create an account to evaluate how Cloud Storage performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.

Try Cloud Storage free

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.