Wildcard DNS- further refined than just subdomains
-
I searched but didn't see what I'm looking for the the wiki seems to be talking about resolving all subdomains to a specific address.
Basically what I'm looking to do is resolve all *-test.mydomain.com entries to a specific IP (my k8s ingress.) I add these somewhat regularly and while not a huge deal, it'd be a little easier to just automatically have them all resolve as they should to the one address.
Could I use the instructions in the wiki to just do *-test.mydomain.com instead of mydomain.com? I'm unsure how it parses it. And I read in another thread that unbound will refuse to start if you have both a domain override and individual host overrides. Looking to avoid having to delete all those host overrides and then finding out a domain override like I'm asking doesn't work then putting them all back.
-
@blueduckdock2 said in Wildcard DNS- further refined than just subdomains:
just do *-test.
Like star dash test dot ?
That's a syntax error. -
server: local-zone: "-test.example.com" redirect local-data: "-test.example.com 86400 IN A 192.168.1.54"
Fair. I think this was what I was thinking of (because as I understand it, a wildcard is "assumed" in front of the domain you specify.)
-
@blueduckdock2 said in Wildcard DNS- further refined than just subdomains:
refuse to start if you have both a domain override and individual host overrides
Huh? You mean if you have say
host.domain.tld in host overrides
then
domain.tld as a domain override..You can for sure have local resources, and then a domain override for stuff that is not local..
Here - I fired up a test domain on a local box.. testdomain.tld, create a A record for www. Then created a host override record on ubound for host.testdomain.tld
Both resolve just fine..
-
I was going off this entry in the stickied thread- https://forum.netgate.com/post/598839
-
So info from 2016 prob not the best of resources ;) hehehe
Should prob spend some time going through any sticky threads and validate any info in them is still relevant or even valid for that matter ;)
-
Well, it appears that using -test.domain.com won't work (unbound won't resolve that right I believe as it's expecting subdomains, not just wildcards.)
I've taken to just adjusting what I've got and using test.domain.com so any hosts I stand up will just have app1.test.domain.com FQDNs.
Thanks all. -
You wouldn't be able to use like something-test.testdomain.tld where -test is part of the host name.
test.domain.tld where you have whatever hosts.test.domain.tld would be the best way yeah.