Remote_ip file whitelist

1. Caddy version: v2.4.6

2. How I installed, and run Caddy: Docker container

a. System environment: Docker

d. My complete Caddy config:

	@hass {
		host hass.anydomain
		path /api*
		path /auth*
                remote_ip forwarded (400IPs in total)

3. The problem I’m having:

I want to use a whitelist of ~400 IPs that are whitelisted via remote_ip matcher. Is it possible to specify a file containing the IPs or another method of achieving this?

That’s quite an old version. Please upgrade to v2.6.2.

Using forwarded is not secure. I strongly recommend removing that.

Not currently, no.

I’d recommend blocking those IP ranges with your firewall software at the networking layer instead of with Caddy. It’ll be more performant.


thanks for pointing out that my Caddy version was outdated - I’ve used a script to build a new image every week for a year but forgot to pull the new base images first.

I’ve also removed the forwarded option.

I’d throw it in the firewall but unfortunately there are multiple sites hosted on the server and I want them all reachable via port 443, so I think I can’t do that, at least on a single host/IP.


You can use snippets to deduplicate bits of your config:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.