CertSafari
    Snowflake SnowPro Advanced: Administrator (ADA-C02)· Lessons

    Domain 1 · Lesson 6/24

    Snowflake network rules and network policy precedence

    Set up and manage network and private connectivity.

    15 min read
    4.43% of exam
    4 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Create network rules with the right TYPE and MODE for the traffic you want to control
    • Update a network rule's value list without breaking the policies that reference it
    • Predict how a policy's allowed and blocked lists treat a request, including private-endpoint traffic
    • Work out which network policy applies when account, user and security-integration policies all exist

    Key concept

    Network rule versus network policy — A network rule is a schema object that only groups identifiers of one type, such as IPv4 ranges or VPCE IDs. A network policy decides whether each rule is allowed or blocked, and it does nothing until it is activated on an account, a user or a security integration.

    1.Network rules: what TYPE and MODE decide

    By default, Snowflake accepts connections to the service and to the internal stage from any device. A network policy limits that, but it never lists addresses itself. It points to network rules, which are schema-level objects that group related identifiers into a logical unit. A rule never says whether its identifiers are allowed or blocked. The policy decides that when the rule goes into its allowed or blocked list. Because of this split, one rule called corp_ips can sit in the allowed list of one policy and the blocked list of another.

    A rule's TYPE says what kind of identifier it holds, and a rule can have only one type. For inbound traffic the types are:

    • IPV4: addresses or CIDR ranges, such as 192.168.1.0/24.
    • IPV6: AWS only, and clients can connect over IPv6 only after ENABLE_DUAL_STACK_LOAD_BALANCER is set to TRUE.
    • AWSVPCEID: VPCE IDs of AWS VPC endpoints. VPC IDs are not supported.
    • AZURELINKID: LinkIDs of Azure private endpoints, which you get from SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS.
    • GCPPSCID: pscConnectionIDs of Google Cloud Private Service Connect endpoints.
    • COMPUTE_POOL: Snowpark Container Services compute pool names, or 'ALL' for every pool in the account.

    HOST_PORT is a different kind of type. It holds domains for outbound traffic and is used with MODE = EGRESS for external network access, not with network policies.

    MODE decides what the rule protects, and the result depends on the type. INGRESS with IPV4 protects only the service unless an account administrator enables ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES. After that, the same rule also protects an AWS internal stage. If you want a stage-only rule, you need MODE = INTERNAL_STAGE, which accepts only AWSVPCEID.

    What an inbound network rule protects, by MODE and TYPE
    MODETYPEWhat it protects
    INGRESSIPV4Snowflake service only; also an AWS internal stage once ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES is enabled
    INGRESSIPV6 (AWS only)Snowflake service only; never internal stages
    INGRESSAWSVPCEID, AZURELINKID, GCPPSCIDSnowflake service only
    INTERNAL_STAGEAWSVPCEID onlyAWS internal stage, without restricting the service; requires ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES
    SNOWFLAKE_MANAGED_STORAGE_VOLUMEAWSVPCEID onlyAWS Snowflake-managed storage volume; requires ENFORCE_NETWORK_RULES_FOR_SNOWFLAKE_MANAGED_STORAGE_VOLUME

    Sometimes several VPCs, subnets or business units share one PrivateLink endpoint. In that case, an INGRESS rule of type AWSVPCEID, AZURELINKID or GCPPSCID can pair the endpoint ID with IP ranges using tuple syntax: {private_link_id:ip_or_cidr[,ip_or_cidr, ...]}. Snowflake then checks the endpoint ID and the private IP together, so overlapping private ranges behind different endpoints don't collide. With a simple one-endpoint-per-VPC layout, a plain endpoint rule is enough.

    To create a rule you need the CREATE NETWORK RULE privilege on the schema. By default only ACCOUNTADMIN, SECURITYADMIN and the schema owner have it, so a custom network_admin role also needs USAGE on the database and schema. Snowflake recommends many small rules over one large list. Examples are a rule for North American client ranges, another for Europe, and one for highly privileged users that you attach only to those users. Put the purpose of each rule in its COMMENT. SHOW NETWORK RULES lists the rules together with their comments.

    Checkpoint 1 of 7· Match them up

    Match each network rule MODE and TYPE combination to what it controls.

    Tap a term, then the definition that fits it.

    Sources12

    2.Changing a rule that policies already reference

    ALTER NETWORK RULE ... SET VALUE_LIST replaces the whole list. Snowflake does not merge the new values with the old ones, so the statement must contain every identifier the rule should hold afterwards. Rules have no ADD VALUE_LIST clause. The only options are SET (for VALUE_LIST and COMMENT) and UNSET, and UNSET VALUE_LIST removes every identifier from the rule. Say the office adds a CIDR block and retires an old one. You write out the full new list once, and that single statement both adds the new block and removes the old one.

    Replacing the value list of an IPv4 network rulesql
    ALTER NETWORK RULE cloud_network SET VALUE_LIST = ('47.88.25.32/27');

    A policy holds a reference to the rule, not a copy of its addresses. So every policy that lists cloud_network enforces the new values right after the ALTER, and you don't have to recreate, reattach or re-activate any policy. ALTER also cannot change a rule's TYPE. An IPv4 rule stays an IPv4 rule, and an egress type like HOST_PORT would not belong in a network policy anyway.

    Policies are where additive edits happen. ALTER NETWORK POLICY supports ADD to append a rule to the allowed or blocked list, REMOVE to take one rule out, and SET to replace a whole list. Use the policy commands to decide which rules a policy uses, and the rule commands to decide what each rule contains.

    Checkpoint 2 of 7· Fill the gap

    A policy called my_policy already allows several network rules. You need it to also allow a new compute pool rule, and every rule it already allows must keep working. Which keyword completes the statement?

    ALTER NETWORK POLICY my_policy
       ?  ALLOWED_NETWORK_RULE_LIST = ('securitydb.myrules.allow_my_compute_pool');

    Checkpoint 3 of 7· Exam question

    A security engineer must maintain a network rule corp_ips that is referenced by several network policies. The office added a new CIDR block and dropped an old one. Select TWO statements that correctly describe how to update the rule.(Select 2)

    0 of 2 selected

    Sources34

    3.How allowed and blocked lists are evaluated

    If a policy's allowed list has a rule of some type, every other identifier of that type is denied. You don't need to add them to the blocked list. A single-address IPv4 rule in the allowed list already blocks every other IPv4 address. The blocked list is for exceptions inside an allowed range, and the blocked list wins on overlap: if an address matches both lists, Snowflake applies the blocked list first.

    So the way to deny one address inside a broad allowed range is a second rule in the same policy's blocked list. Don't split the range into smaller allowed rules that skip the address, and don't create user-level policies to work around it. Comments are only for your own records and play no part in evaluation.

    Allow 192.168.1.0/24 except 192.168.1.99; addresses outside the range are blocked toosql
    CREATE NETWORK RULE allow_access_rule
      MODE = INGRESS
      TYPE = IPV4
      VALUE_LIST = ('192.168.1.0/24');
    
    CREATE NETWORK RULE block_access_rule
      MODE = INGRESS
      TYPE = IPV4
      VALUE_LIST = ('192.168.1.99');
    
    CREATE NETWORK POLICY public_network_policy
      ALLOWED_NETWORK_RULE_LIST = ('allow_access_rule')
      BLOCKED_NETWORK_RULE_LIST=('block_access_rule');

    Private-endpoint rules follow two extra rules. First, they take precedence over IP rules. If a request arrives over private connectivity and the allowed list contains an AWSVPCEID or AZURELINKID rule, Snowflake ignores every IPV4 and IPV6 rule in that policy. Second, they never evaluate requests from the public internet. To allow only your endpoint, you need two rules: the endpoint rule in the allowed list, and an IPv4 rule for 0.0.0.0/0 in the blocked list.

    Allow one VPC endpoint and block all public IPv4 trafficsql
    CREATE NETWORK RULE block_public_access
      MODE = INGRESS
      TYPE = IPV4
      VALUE_LIST = ('0.0.0.0/0');
    
    CREATE NETWORK RULE allow_vpceid_access
      MODE = INGRESS
      TYPE = AWSVPCEID
      VALUE_LIST = ('vpce-0fa383eb170331202');
    
    CREATE NETWORK POLICY allow_vpceid_block_public_policy
      ALLOWED_NETWORK_RULE_LIST = ('allow_vpceid_access')
      BLOCKED_NETWORK_RULE_LIST=('block_public_access');

    IPv4 and IPv6 rules in the same policy are evaluated separately for each request. If a request arrives over IPv6 and the policy has no IPv6 rules, Snowflake checks it against the IPv4 rules only. Compute pools are the strict exception. Requests from a Snowpark Container Services service that uses customer-provided credentials match only COMPUTE_POOL rules, so even 0.0.0.0/0 won't let them through. Without a matching pool rule they fail with error 390422. Older policies may still use ALLOWED_IP_LIST and BLOCKED_IP_LIST. They keep working, but new policies should use network rules, and one policy shouldn't mix the two methods.

    Checkpoint 4 of 7· Check yourself

    Your account policy's allowed list holds an IPv4 rule for 10.20.0.0/16, and its blocked list holds an IPv4 rule for 10.20.9.0/24. Requests arrive from 10.20.1.4, 10.20.9.15 and 172.31.0.8. Which of them get through?

    Checkpoint 5 of 7· Exam question

    A contractor works from 10.20.30.40, inside the 10.0.0.0/8 range that the company's account-level network policy allows through ALLOWED_NETWORK_RULE_LIST. The company needs to deny that single address without shrinking the allowed range. What is the most appropriate change?

    Sources4

    4.Which policy applies: account, user or security integration

    A network policy doesn't restrict anything until you activate it. At account level, SECURITYADMIN or higher, or a role with the global ATTACH POLICY privilege, runs ALTER ACCOUNT SET NETWORK_POLICY = my_policy;. An account has only one active policy, and activating a new one replaces the old one. Snowflake rejects the activation unless your current IP address or private endpoint identifier is in the allowed list and not in the blocked list. That check prevents you from locking yourself out.

    At user level, ALTER USER joe SET NETWORK_POLICY = my_policy; attaches a policy. This takes OWNERSHIP of the user plus USAGE on the policy, or a higher role. Each user has at most one policy at a time. Security integrations for SCIM, Snowflake OAuth and External OAuth take a NETWORK_POLICY parameter of their own. On every level, a user who is already logged in from a location that is now restricted can't run further queries.

    If more than one level has a policy, the most specific one applies and the others are ignored. The order is:

    1. Account policies are the most general. Any user or integration policy overrides them.
    2. User policies override the account policy.
    3. Security integration policies are the most specific. They override both account and user policies.

    The winning policy replaces the others completely. Snowflake doesn't intersect them, and passing either one is not enough. In the example above, only BI_SVC's own policy is checked. The address 10.1.4.4 is outside 172.16.0.0/16, so the login is rejected, even though the account policy would allow it. The reverse also holds: a user policy can let a user in from an address the account policy blocks.

    Snowflake OAuth adds one exception. For client-to-Snowflake traffic such as token requests, the user-level policy is not checked, only the integration and account policies. The built-in SNOWFLAKE$LOCAL_APPLICATION integration is the exception to that exception and enforces the user policy too. Then there is MINS_TO_BYPASS_NETWORK_POLICY, a user property that lifts a policy for a set number of minutes. You can see it with DESCRIBE USER, but only Snowflake can set it, through Snowflake Support. To check which object a policy is attached to, use the POLICY_REFERENCES function and its ref_entity_name and ref_entity_domain columns. Policies and rules both replicate with failover groups, along with their assignments. That replication belongs to account replication.

    Checkpoint 6 of 7· Check yourself

    User JOE signs in through an External OAuth security integration. Three policies are active. The account policy allows only 10.0.0.0/8. JOE's user policy allows only 172.16.0.0/16. The integration's own policy allows only 192.168.5.0/24. JOE connects through the integration from 192.168.5.20. What happens?

    Checkpoint 7 of 7· Exam question

    An account has a network policy that allows only 203.0.113.0/24, set with ALTER ACCOUNT SET NETWORK_POLICY. The service user SVC_ETL has its own user-level policy that allows only 198.51.100.0/24. A job connects as SVC_ETL from 203.0.113.15. What happens?

    Sources4

    Sources

    (4)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Network rules are schema-level objects that group network identifiers into logical units.”
      ↩︎ Network rules: what TYPE and MODE decide
      “If the account administrator enables the ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES parameter, then MODE=INGRESS and TYPE=IPV4 also protects an AWS internal stage.”
      ↩︎ Network rules: what TYPE and MODE decide
      “You need the CREATE NETWORK RULE privilege on the schema to create a network rule.”
      ↩︎ Network rules: what TYPE and MODE decide
      “A network rule does not define whether its identifiers should be allowed or blocked.”
      ↩︎ Key concept
      “Controls access to an AWS internal stage without restricting access to the Snowflake service.”
      ↩︎ Checkpoint
    2. 3.
      “Replaces the current network identifiers with a new list of identifiers.”
      ↩︎ Changing a rule that policies already reference
      “Using this command is not additive; previously specified values are removed when you set a new value list.”
      ↩︎ Exam trap 2
    3. 4.
      “a network policy adds network rules to its allowed and blocked lists”
      ↩︎ Changing a rule that policies already reference
      “Snowflake applies the values in the BLOCKED_IP_LIST parameter first. This behavior also applies to the ALLOWED_NETWORK_RULE_LIST and the BLOCKED_NETWORK_RULE_LIST parameters.”
      ↩︎ How allowed and blocked lists are evaluated
      “then all IPV4 and IPV6 network rules that contain public or private IP ranges are ignored”
      ↩︎ How allowed and blocked lists are evaluated
      “only the allowed identifiers have access”
      ↩︎ How allowed and blocked lists are evaluated
      “A network policy doesn’t restrict network traffic until it is activated.”
      ↩︎ Which policy applies: account, user or security integration
      “For Snowflake OAuth, the user-level network policy is not considered for client-to-Snowflake traffic such as token requests.”
      ↩︎ Which policy applies: account, user or security integration
      “Only Snowflake can set the value for this object property.”
      ↩︎ Which policy applies: account, user or security integration
      “Note that your current IP address or private endpoint identifier must be included in the allowed list in the policy.”
      ↩︎ Which policy applies: account, user or security integration
      “Network policies applied to a user override network policies applied to the account”
      ↩︎ Exam trap 1
      “has no effect on requests coming from the public network”
      ↩︎ Exam trap 3
      “has no effect on requests coming from the public network”
      ↩︎ Prediction
      “Network policies applied to a security integration are the most specific network policies. They override both accounts and users.”
      ↩︎ Checkpoint

    Continue to part 2 of 2

    Snowflake private connectivity and SQL API security

    Spotted a mistake, or was something unclear? Tell us.