Add country-based IP blocking for Caddy via Ansible
- Introduce generate_country_blocks.py to fetch IP ranges by country - Update group_vars/servers.yml with country blocking settings - Add country_block snippet to Caddyfile and apply to all sites - Create Ansible tasks for automated IP range generation and integration - Add documentation for configuring and managing country blocking
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
---
|
||||
flatpaks: false
|
||||
install_ui_apps: false
|
||||
|
||||
# Country blocking configuration for Caddy
|
||||
# List of countries to block by ISO 3166-1 alpha-2 country codes
|
||||
# Common examples: CN (China), RU (Russia), KP (North Korea), IR (Iran), BY (Belarus)
|
||||
blocked_countries_codes:
|
||||
- CN # China
|
||||
- RU # Russia
|
||||
- KP # North Korea
|
||||
- IR # Iran
|
||||
|
||||
# IP ranges for blocked countries (generated automatically)
|
||||
# This will be populated by the country blocking script
|
||||
blocked_countries: []
|
||||
|
||||
# Enable/disable country blocking globally
|
||||
enable_country_blocking: true
|
||||
|
Reference in New Issue
Block a user