Block traffic from specific countries
This example blocks requests based on country code using the ip.src.country
field.
- Expression:
(ip.src.country in {"KN" "SY"})
- Action: Block
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark