Hello everyone,
I’ve been researching a way to automate adding DNS aliases to an existing host override in pfSense (unbound) whenever Docker containers start, but I haven’t been able to find a solution. I wanted to reach out here in case I’ve missed something or if someone has already built a similar tool.
Here’s what I’m trying to achieve:
- Scenario: I have a host override in pfSense for a reverse proxy
caddy.mydomain.com
. - Goal: Automatically add aliases to this host override whenever new Docker containers are launched, based on specific labels in their configuration (e.g.,
pfsense.dns.alias=my-new-service.mydomain.com
). - Reverse-Proxy Agnostic: The solution should work regardless of the reverse proxy being used (e.g., Caddy, NGINX, Traefik, etc.).
I’ve searched extensively and have found tools that work with specific reverse proxies – mostly by redirecting *.example.com to the reverse proxy – but nothing that is generalized for this type of integration with pfSense. I’ve also explored using other DNS solutions (e.g. Pi-hole, AdGuard Home) but would like to keep my DNS in the firewall.
If such a solution exists, I’d greatly appreciate a nudge in the right direction. If not, I’d love to hear any thoughts or recommendations on what you’d like to see in such a service should I decide to build it myself using the pfSense and Docker APIs.
Thanks in advance for your insights and help!