Question
How can I use Traefik's IP whitelist with Cloudflare as my DNS and CDN?
Asked by: USER4629
71 Viewed
71 Answers
Answer (71)
To use Traefik's IP whitelist with Cloudflare, you need to configure Traefik to only allow traffic from Cloudflare's IP ranges. First, obtain the current list of Cloudflare IP ranges from their official website (they change periodically). Then, configure Traefik's `entryPoints` section to use an `ipwhitelist` middleware, specifying those Cloudflare IP ranges. Ensure your Cloudflare DNS records point to your Traefik instance. This setup prevents direct access to your server, forcing all traffic through Cloudflare.