Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 2.3 KB

File metadata and controls

61 lines (40 loc) · 2.3 KB
title Create an IP access rule
pcx_content_type how-to
sidebar
order label
2
Create a rule

import { TabItem, Tabs, Steps, DashButton } from "~/components";

:::tip[Recommendation: Use custom rules instead] Cloudflare recommends that you create custom rules instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking). :::

:::note IP Access Rules are only available in the new security dashboard if you have configured at least one IP access rule. :::

  1. In the Cloudflare dashboard, go to the Security rules page.

  2. Select Create rule > IP access rules.

  3. Enter the following rule details:

    1. For IP, IP range, country name, or ASN, enter an IP address, IP range, country code/name, or Autonomous System Number (ASN). For details, refer to IP Access rules parameters.
    2. For Action, select an action.
    3. For Zone, select whether the rule applies to the current website only or to all websites in the account.
    4. (Optional) Enter a note for the rule (for example, Payment Gateway).
  4. Select Create.

  1. Log in to the Cloudflare dashboard, and select your account and domain.

  2. Go to Security > WAF > Tools.

  3. Under IP Access Rules, enter the following details:

    1. For Value, enter an IP address, IP range, country code/name, or Autonomous System Number (ASN). For details, refer to IP Access rules parameters.
    2. Select an action.
    3. For Zone, select whether the rule applies to the current website only or to all websites in the account.
    4. (Optional) Enter a note for the rule (for example, Payment Gateway).
  4. Select Add.

Use the Cloudflare API to programmatically create IP access rules. For more information, refer to Create an IP Access Rule.