[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/waf/custom-rules/use-cases/site-admin-only-known-ips/ [Back]  [Original]

Require known IP addresses in site admin area Cloudflare Web Application Firewall (WAF) docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /WAF
  3. /
  4. /Common use cases
  5. /Require known IP addresses in site admin area

Require known IP addresses in site admin area

Last updated Apr 16, 2026Copy as MarkdownView as MarkdownAgent setup
OverviewOther resources

If an attack compromises the administrative area of your website, the consequences can be severe. With custom rules, you can protect your site's admin area by blocking requests for access to admin paths that do not come from a known IP address.

This example custom rule limits access to the WordPress admin area, /wp-admin/, by blocking requests that do not originate from a specified set of IP addresses:

  • When incoming requests match:

    Field Operator Value Logic
    IP Source Address is not in 10.20.30.40 192.168.1.0/24 And
    URI Path wildcard /wp-admin/*

    If you are using the expression editor:
    (not ip.src in {10.20.30.40 192.168.1.0/24} and http.request.uri.path wildcard "/wp-admin/*")

  • Then take action: Block

Other resources

PreviousRequire a specific cookieNextRequire specific HTTP headers

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page