Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to get the IP filtering rules on a bucket. For information about
bucket IP filtering, see Bucket 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 the
Required permissions section:
Required permissions
storage.buckets.get
storage.buckets.getIpFilter
You can also get these permissions with custom 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 to IAM roles for Cloud Storage.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Get IP filtering rules\n\nThis page describes how to get the IP filtering rules on a bucket. For information about\nbucket IP filtering, see [Bucket IP filtering](/storage/docs/ip-filtering-overview).\n\nRequired roles\n--------------\n\nTo 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`)\nrole on the bucket. This role contains the permissions required to get bucket IP filtering rules.\n\nTo see the exact permissions that are required, expand the\n**Required permissions** section: \n\n#### Required permissions\n\n- `storage.buckets.get`\n- `storage.buckets.getIpFilter`\n\nYou can also get these permissions with [custom roles](/iam/docs/creating-custom-roles). You might be able to get these permissions with other predefined roles as well. To see which roles are associated with which permissions,\nrefer to [IAM roles for Cloud Storage](/iam/docs/understanding-roles).\n\nFor instructions on granting roles for projects, see [Manage access to\nprojects](/iam/docs/granting-changing-revoking-access).\n\nGet bucket IP filtering rules\n-----------------------------\n\n### gcloud\n\n1. Verify that you have the Google Cloud CLI version 526.0.0 or later installed:\n\n gcloud version | head -n1\n\n2. If you have an earlier gcloud CLI version installed, update the version:\n\n gcloud components update --version=526.0.0\n\n3. To get the IP filtering rules on a bucket, run the command [`gcloud\n alpha storage buckets describe`](/sdk/gcloud/reference/alpha/storage/buckets/describe) in your development\n environment:\n\n ```\n gcloud alpha storage buckets describe gs://BUCKET_NAME --format=\"default(ip_filter_config)\"\n ```\n\n Where:\n\n \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e is the name of your bucket. For example, `my-bucket`.\n\n### REST APIs\n\n### JSON API\n\n1. Have gcloud CLI [installed and initialized](/sdk/docs/install), which lets\n you generate an access token for the `Authorization` header.\n\n\n2.\n\n Use [`cURL`](http://curl.haxx.se/) to call the [JSON API](/storage/docs/json_api) with a [`GET` bucket](/storage/docs/json_api/v1/buckets/get) request: \n\n ```\n curl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://storage.googleapis.com/storage/v1/b/BUCKET_NAME\"\n ```\n\n Where:\n\n \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e is the name of your bucket. For example, `my-bucket`.\n\nWhat's next\n-----------\n\n- [Create or update IP filtering rules on an existing bucket](/storage/docs/update-ip-filter).\n- [List bucket IP filtering rules](/storage/docs/list-ip-filter).\n- [Disable bucket IP filtering rules](/storage/docs/disable-ip-filtering).\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)"]]