IP Blocker
The IP Blocker lets you block or whitelist specific IP addresses. You can target exact IPs, IP prefixes, or CIDR ranges, and supports both IPv4 and IPv6.
Creating an IP Block
Click the Create IP block button to open the creation modal. The following fields are available:
Block Type
- Whitelist — “Only allowed IPs will be able to access the site.” Whitelisted IPs bypass all other blockers (country, VPN, bot, etc.) for the session.
- Blacklist — “Blocked IPs will be prevented from accessing the store.”
IP Version
- IPv4 — Standard IP addresses (e.g., 192.168.1.1)
- IPv6 — Extended IP addresses (e.g., 2001:db8::1)
Match Condition
- Exact IP address — Matches a single specific IP address.
- IP starts with — Matches any IP that begins with the entered prefix (e.g.,
192.168.matches all IPs starting with 192.168). - IP range (CIDR) — Matches all IPs within a CIDR range (e.g.,
192.168.1.0/24covers 192.168.1.0 through 192.168.1.255).
IP Address Input
Enter one or more IP addresses separated by commas. Each IP appears as a removable tag below the input field.
The app validates IPs based on the selected version and match condition, and shows an error banner listing any invalid entries.
Page Selection
- All pages — The block applies across your entire store.
- Selected pages — The block applies only to specific pages, collections, products, or blogs that you select.
Redirect Page
An optional URL where blocked visitors will be redirected. If left empty, the default block page is shown.
Managing IP Blocks
Table View
All IP blocks are displayed in a table with the following columns:
| Column | Description |
|---|---|
| Block type | Shows “whitelist” (green badge) or “blacklist” (orange badge) |
| IP address | The IP, prefix, or CIDR range |
| Created at | When the block was created (sorted newest first) |
| Enable/Disable | Toggle switch to activate or deactivate the block |
| Edit | Opens the block for editing |
Filtering
Use the Whitelist and Blacklist filter buttons at the top to show or hide entries by type.
Enable/Disable
Each IP block has its own toggle switch. Disabled blocks remain saved but are not enforced on the storefront. Only enabled blocks are included in your store’s security configuration.
CIDR Range Blocking
CIDR (Classless Inter-Domain Routing) lets you block an entire range of IP addresses with a single entry.
IPv4 examples:
192.168.1.0/24— Blocks 256 addresses (192.168.1.0 to 192.168.1.255)10.0.0.0/8— Blocks all addresses starting with 10.
IPv6 examples:
2001:db8::/32— Blocks all addresses in the 2001:db8 range.
CIDR prefix length must be between 1-32 for IPv4 and 1-128 for IPv6.
Duplicate Prevention
The app prevents adding the same IP address with the same block type. If you try to add a duplicate, a warning banner appears:
“The following IP address is already blocklisted/allowlisted:“
How Whitelisting Works
Whitelisted IPs receive special treatment:
- When a visitor’s IP matches a whitelist entry, they are allowed through immediately.
- The visitor is marked as whitelisted in the security context for the session.
- All other blockers are skipped — country blocking, VPN blocking, bot blocking, and other rules do not apply to whitelisted visitors.
This is useful for whitelisting your own IP, office IPs, or trusted partner IPs.
How Blocking Works on the Storefront
- Kedra Shield fetches the visitor’s IP address.
- Whitelist entries are checked first — if the IP matches, the visitor is allowed and all further checks are skipped.
- Blacklist entries are checked next — if the IP matches, the visitor is blocked.
- The match condition determines how the comparison works:
- Exact: The visitor’s IP must match exactly.
- Starts with: The visitor’s IP must begin with the stored prefix.
- CIDR: The visitor’s IP must fall within the stored CIDR range (calculated using bitwise comparison).
- IPv4 entries only match IPv4 visitors, and IPv6 entries only match IPv6 visitors.
If IP data cannot be fetched, the visitor is allowed through (fail-open design).
Next Steps
- Location Blocker — Block access by country and city.
- ASN Blocker — Block entire network providers.
- How Blocking Works — Understand the overall blocking flow.