Rule lists in Peakhour provide a powerful way to manage and apply rules across various configurations. They allow you to create reusable sets of IP addresses, text strings, or integer values that can be referenced in your firewall rules, rate limiting configurations, and other settings.
IP lists contain a collection of IP addresses or CIDR ranges. They are useful for creating allow lists, block lists, or any configuration where you need to apply rules based on IP addresses.
Example use case: Create a trusted IP list for administrative access
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
203.0.113.42
You can reference this list in a firewall rule:
ip.src in $trusted_ips
Text lists contain strings that can be used for matching against various text-based fields like user agents, TLS fingerprints, or HTTP headers.
Example use case: Create a list of allowed user agents for API access
MyApp/1.0
PartnerBot/2.1
LegacyClient/0.9
You can use this list in a firewall rule:
http.user_agent in $allowed_user_agents
Integer lists contain numeric values, which can be useful for matching against ASNs (Autonomous System Numbers) or other numeric identifiers.
Example use case: Create a list of trusted ASNs
13335
16509
14618
You can use this list in a rate limiting configuration:
ip.geoip.asnum in $trusted_asns
To create a rule list:
You can edit or delete existing lists as needed.
Once you've created a rule list, you can reference it in various configurations using the $list_name
syntax. This allows you to create more maintainable and flexible rules.
Example: Rate limiting configuration using a trusted ASN list
rate_limit.add_zone:
zone: api_requests
key:
- ip
action:
type: block
status_code: 429
condition: not (ip.geoip.asnum in $trusted_asns)
Rule lists provide a flexible and powerful way to manage complex configurations in Peakhour. By leveraging these lists, you can create more maintainable, efficient, and scalable rules across your CDN configuration. Title: Rule Lists: Enhancing Control and Flexibility
Rule lists in Peakhour provide a powerful way to manage and apply rules across various configurations. They allow you to create reusable sets of IP addresses, text strings, or integer values that can be referenced in your firewall rules, rate limiting configurations, and other settings.
IP lists contain a collection of IP addresses or CIDR ranges. They are useful for creating allow lists, block lists, or any configuration where you need to apply rules based on IP addresses.
Example use case: Create a trusted IP list for administrative access
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
203.0.113.42
You can reference this list in a firewall rule:
ip.src in $trusted_ips
Text lists contain strings that can be used for matching against various text-based fields like user agents, TLS fingerprints, or HTTP headers.
Example use case: Create a list of allowed user agents for API access
MyApp/1.0
PartnerBot/2.1
LegacyClient/0.9
You can use this list in a firewall rule:
http.user_agent in $allowed_user_agents
Integer lists contain numeric values, which can be useful for matching against ASNs (Autonomous System Numbers) or other numeric identifiers.
Example use case: Create a list of trusted ASNs
13335
16509
14618
You can use this list in a rate limiting configuration:
ip.geoip.asnum in $trusted_asns
To create a rule list:
You can edit or delete existing lists as needed.
Once you've created a rule list, you can reference it in various configurations using the $list_name
syntax. This allows you to create more maintainable and flexible rules.
Example: Rate limiting configuration using a trusted ASN list
rate_limit.add_zone:
zone: api_requests
key:
- ip
action:
type: block
status_code: 429
condition: not (ip.geoip.asnum in $trusted_asns)
Rule lists provide a flexible and powerful way to manage complex configurations in Peakhour. By leveraging these lists, you can create more maintainable, efficient, and scalable rules across your CDN configuration.