Wildcard Dns Pihole
If you’re running a homelab you might be running a DNS server, like bind to manage your DNS records, zones, etc, and frankly, bind does an excellent job at that. However, sometime you might find your self running a home lab with a service like Pi-Hole.
With Pi-Hole you can create a custom DNS with a simple click, but you can’t create a wildcard DNS via web interface.
Why a wildcard DNS?
If you plan to run a kubernetes cluster, openshift, traefik or reverse-proxy you need point all subdomain name into a one ip.
Create a wildcard DNS
Connect to Pi-Hole machine or container and follow these steps:
-
go to
/etc/dnsmasq.d/
-
create a new file, lets call it
02-my-wildcard-dns.conf
-
Edit the file and add this:
address=/my-wildcard.home/192.168.1.40
-
Save and exit
-
Restart Pi-Hole service with
service pihole-FTL restart
You can add one ore more wilcard dns rule in step 3 as you want.
🎉 Happy dns