1. The problem I’m having:
I simply want to know if Caddy has a mechanism to match a source client based on their DNS. Meaning, something similar to
remote_ip remotesite.ddnsdomain.com
where Caddy looks up somedomainname.com on some schedule/based on TTL and keeps a cache of the IP response. Many firewalls do this so you can say “Allow from host.ddnsdomain.com”. This is especially useful when dealing with source IPs that are on DDNS.
Google has turned up nothing, but I figured I might ask. Alternatively can I reference a file that I populate something like
file_path filevariablename /opt/listofIPs
remote_ip filevariablename
And Caddy knows about changes to that file without a restart.
or I populate env variables or really any way to do this.
My fall back is something like use a snippet, create a cron of some sort to update the snippet with IPs and another cron or something to restart Caddy when the modify time changes to the snippet.
2. Error messages and/or full log output:
N/A
3. Caddy version:
2.6.4
4. How I installed and ran Caddy:
Docker
a. System environment:
Docker, Debian 11
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddy config:
N/A