Help with Wildcard Domains under PiHole v6 & Docker

I am running my PiHole instance in Docker, hosted on a TrueNAS system with several other Docker apps and a virtual Linux machine that is acting as a Web Server and Proxy Server. My basic setup is this:

TrueNAS Host: 10.0.0.253
VM with Web Server: 10.0.0.240
PiHole: 10.0.0.253 (with ports available, no conflicts w/ Host)
Other Docker Apps: 10.0.0.253 + Ports

The web server is hardened, and in the DMZ on my home internet, letting me access it and its functions from the outside world. The web server also acts as a proxy, so I can browse DNS names to access Docker images by simple URLs, instead of IPs / Ports. Additionally, the web server hosts a bunch of websites, most of which are subdomains under a single domain.

Because I have close to a dozen subdomains for either sites or proxy sites under my main domain and I am constantly adding and removing other subdomains, I'd like to set up a wildcard DNS so that any time I add / remove / change a subdomain, I don't need to do extra maintenance (or forget to do extra maintenance) on PiHole's DNS.

Examples:
aiskon.net (Main domain)
www.aiskon.net (website)
cloud.aiskon.net
photos.aiskon.net
media.aiskon.net
etc.

I did a search on this, and tried to follow the examples given, but I can't seem to get this to work. What I am doing is: under /etc/pihole/dnsmasq.d/ I am making a file "virtualmin-hosts.conf" and adding the following line:

address=/*.aiskon.net/10.0.0.240

Then I save the file, and restart the Docker image. However, I still can't resolve to anything other than aiskon.net itself, which is defined in the DNS interface in PiHole.

What am I missing, in order to be able to resolve subdomains using a wildcard?

Thank you for your help!

Did you enable misc.etc_dnsmasq_d option to allow importing your files?

I missed that - it's enabled now, and I restarted the Docker instance, but the issue is persisting.

EDIT - should the additional files be in /etc/dnsmasq.d/ or in /etc/pihole/dnsmasq.d/ ? I don't see the former on my Docker image.

OK, I was able to resolve this. I added the following line to my Docker config:

  - /mnt/data/apps/pihole/dnsmasq.d:/etc/dnsmasq.d

That mapped it, and now things are resolving properly, while keeping everything under /etc/pihole

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