1. The problem I’m having:
I’m trying to set up a site where users are only allowed if they come from a whitelisted IP or they have a certificate installed that I have created.
It has proven to a bit of a mountain I’m trying to climb and I am not entirely sure this is even possible.
I can’t seem to find any OR matcher definition in the documentation.
Is it not possible to check for either valid IP or valid self signed certificate?
2. Error messages and/or full log output:
No errors, yet, since I can't find any OR matcher.
3. Caddy version:
v2.6.4
4. How I installed and ran Caddy:
Installed Caddy with the caddy_windows_amd64.exe file downloaded from the main site with 0 extra features selected. Installed as a service with WinSW (Keep Caddy Running — Caddy Documentation).
a. System environment:
Windows 10 Pro 22H2 build 19045.2486
b. Command:
Caddy Service is set up from GUIDE to run the exe file
caddy.exe
I reload the caddyfile configuration with
caddy reload
c. Service/unit/compose file:
Not relevant
d. My complete Caddy config:
(allowed) {
@blocked not {
remote_ip 10.0.0.0/24
remote_ip 195.249.218.110
remote_ip 195.249.218.111
}
}
(blocked) {
respond @blocked "I have gone and will not return" 410
}
hass.sewers.dk {
encode gzip
import allowed
import blocked
reverse_proxy http://10.0.0.154:8123
}