This module retrieves an IP list from specified URLs at a defined interval. It is designed to integrate with other modules like dynamic_client_ip
or trusted_proxy
in Caddy.
Supported from Caddy v2.6.3 onwards.
You can get dynamic_client_ip
from here
@denied dynamic_client_ip list {
url https://www.cloudflare.com/ips-v4 # specify the URL to fetch the IP list
url https://www.cloudflare.com/ips-v6 # You can use multiple URLs
interval 12h
timeout 15s
}
abort @denied
trusted_proxies list {
url https://www.cloudflare.com/ips-v4 # specify the URL to fetch the IP list
url https://www.cloudflare.com/ips-v6 # You can use multiple URLs
interval 12h
timeout 15s
}
Name | Description | Type | Default |
---|---|---|---|
url | URL(s) to retrieve the IP list | string | required |
interval | Frequency at which the IP list is retrieved | duration | 1h |
timeout | Maximum time to wait for a response from the URL | duration | no timeout |