How to Manage Rule Lists¶
This guide shows you how to create, edit, and use rule lists in Peakhour to maintain reusable collections of IP addresses, text strings, or integers.
Before you begin: Review Rule Lists Concepts to understand the different types of rule lists and their applications.
Access Rule Lists¶
- Navigate to your domain dashboard in Peakhour
- Click on Rule Lists in the main navigation menu
Create a New Rule List¶
Create an IP List¶
For managing collections of IP addresses or CIDR ranges:
- Click Create New List
- Select IP List as the type
- Enter a descriptive name (e.g.,
trusted_admin_ips
) - Add IP addresses or ranges, one per line:
- Click Save List
Create a Text List¶
For managing collections of text strings:
- Click Create New List
- Select Text List as the type
- Enter a descriptive name (e.g.,
allowed_user_agents
) - Add text strings, one per line:
- Click Save List
Create an Integer List¶
For managing collections of numeric values:
- Click Create New List
- Select Integer List as the type
- Enter a descriptive name (e.g.,
trusted_asns
) - Add integer values, one per line:
- Click Save List
Edit Existing Rule Lists¶
Add Entries to a List¶
- Find your list in the Rule Lists section
- Click Edit next to the list name
- Add new entries at the end of the existing content
- Click Save Changes
Remove Entries from a List¶
- Click Edit on your rule list
- Delete the lines containing entries you want to remove
- Click Save Changes
Bulk Update a List¶
- Click Edit on your rule list
- Replace the entire content with your new list
- Click Save Changes
Note: Changes propagate globally within seconds.
Use Rule Lists in Configurations¶
Reference Lists in Firewall Rules¶
Use the $list_name
syntax to reference your lists:
# Block traffic from suspicious IPs
ip.src in $suspicious_ips
# Allow specific user agents
http.user_agent in $allowed_user_agents
# Rate limit based on ASN
ip.geoip.asnum not in $trusted_asns
Reference Lists in Rate Limiting¶
# Create rate limiting rule using ASN list
if (ip.geoip.asnum not in $trusted_asns) {
rate_limit.add_zone(
zone: "general",
key: ["ip"],
rate: "100r/m"
)
}
Reference Lists in Other Rules¶
Lists can be used in any rule phase that supports the referenced data type:
Manage List Lifecycle¶
Monitor List Usage¶
- Check which rules reference each list in the Usage tab
- Review impact before making changes to widely-used lists
- Test changes in a staging environment when possible
Delete Unused Lists¶
- Verify no rules reference the list in the Usage tab
- Click Delete next to the list name
- Confirm deletion when prompted
Warning: Deleting a list referenced by active rules will cause those rules to fail.
Common Use Cases and Examples¶
Administrative Access Control¶
# Create admin IP list
Name: admin_office_ips
Type: IP List
Content:
203.0.113.0/24
198.51.100.50
10.1.1.0/24
# Use in firewall rule
if (http.request.uri.path matches "/admin/" and ip.src not in $admin_office_ips) {
firewall.deny
}
Bot Management¶
# Create good bot list
Name: verified_bots
Type: Text List
Content:
Googlebot/2.1
Bingbot/2.0
Slackbot/1.0
# Use in rate limiting
if (http.user_agent not in $verified_bots) {
rate_limit.add_zone(zone: "bot_protection", rate: "10r/m")
}
Partner Network Management¶
# Create partner ASN list
Name: partner_asns
Type: Integer List
Content:
13335
16509
8075
# Use for preferential treatment
if (ip.geoip.asnum in $partner_asns) {
cache.ttl = 3600
} else {
cache.ttl = 300
}
Best Practices¶
Naming Conventions¶
- Use descriptive names that indicate purpose and content type
- Use underscores for readability (e.g.,
trusted_admin_ips
) - Include the environment if lists differ between staging/production
Content Management¶
- Keep lists organized with related entries grouped together
- Document complex entries with inline comments where supported
- Regular review and cleanup of outdated entries
Operational Procedures¶
- Test list changes in staging environments first
- Monitor traffic patterns after making list updates
- Keep backups of critical lists before major changes
- Use descriptive names that make the list's purpose clear to other team members
Troubleshooting¶
Rule not matching after list update:
- Verify the list was saved successfully
- Check that rule syntax correctly references the list name
- Wait up to 60 seconds for changes to propagate globally
Cannot delete list:
- Check the Usage tab to see which rules reference the list
- Remove or update references before attempting deletion
List not available in rule editor:
- Ensure the list name follows valid naming conventions
- Verify the list was saved successfully and propagated