Protecting Your Admin Panel
To restrict admin paths like /admin or /wp-admin to your team’s IP addresses, first create an IP list, then write a rule that blocks everyone not on that list.
Step 1: Create an IP list
Section titled “Step 1: Create an IP list”-
Open Console → WAF → [domain] → Rules → IP Lists.
-
Click New List:
- List name:
office-ips(3–16 characters, alphanumeric,-and_) - Items: one IP or CIDR block per line (up to 256 items)
203.0.113.10198.51.100.0/24 - List name:
-
Save the list.
Step 2: Write the block rule
Section titled “Step 2: Write the block rule”-
Follow Console → WAF → [domain] → Rules → New Rule.
-
Combine two conditions with Add Condition (AND):
- Field: Path (without query) (
http.request.base_uri) · Operator: starts with (has_prefix) · Value:/admin - Field: IP List (
ip.list) · Operator: not in list (not_in) · Value:office-ips
# Allow admin panel access only from listed IPsIF http.request.base_uri has_prefix /adminAND ip.list not_in office-ipsTHEN block - Field: Path (without query) (
-
Select Block as the action (or CAPTCHA for softer protection) and save.
Alternative: single IP without a list
Section titled “Alternative: single IP without a list”If you only have one static IP, you can skip the list and use the ip.src field:
# Block admin access except from a single IPIF http.request.base_uri has_prefix /adminAND ip.src != 203.0.113.10THEN blockVerification
Section titled “Verification”- Try accessing
/adminfrom a network not on the list (e.g. your phone’s mobile data); you should see the block page. - Confirm access works normally from a listed IP.
- Watch the rule’s hit counter on the Rules page; if it climbs unexpectedly fast, you may be blocking legitimate traffic too.
Related Pages
Section titled “Related Pages”IP ListsManaging named IP lists
Trusted IP ExemptionsDefining broad exemptions for known IPs