--- title: "Bucket Access Restricted to a Specific IP Address" slug: "how-to-restrict-access-to-a-bucket-to-specific-ip-address" updated: 2026-02-06T21:42:44Z published: 2026-02-06T21:42:44Z canonical: "docs.wasabi.com/how-to-restrict-access-to-a-bucket-to-specific-ip-address" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.wasabi.com/llms.txt > Use this file to discover all available pages before exploring further. # Bucket Access Restricted to a Specific IP Address You can restrict access to objects in your bucket to a specific IP address by attaching a policy that contains an allowed IP address range in the `Condition` statement. In the following example, a policy restricts access to two IP addresses: - 179.22.0.0/16 restricts all IP addresses within the /16 subnet - 129.34.67.24/32 restricts just that specific IP address ```powershell {        "Id": "Policy1512590315712",        "Version": "2012-10-17",        "Statement": [        {        "Sid": "Stmt1512590314407",        "Effect": "Deny",        "Principal": {        "AWS": "*"        },        "Action": "*",        "Resource": [        "arn:aws:s3:::my-bucket",        "arn:aws:s3:::my-bucket/*"        ],        "Condition": {        "NotIpAddress": {        "aws:SourceIp": ["179.22.0.0/16","129.34.67.24/32"]        }        }        }        ]        } ```