Score:0

point CNAME Record to multiple wildcard A Records

hu flag

I am trying to point my cname to my wildcard FQDN which has multiple A-Records.

Dig Output:

;; QUESTION SECTION:
;access.domain.intra.   IN      A

;; ANSWER SECTION:
access.domain.intra. 3600 IN    CNAME   *.sub.domain.intra.
*.sub.domain.intra. 3600 IN    A       192.168.1.1
*.sub.domain.intra. 3600 IN    A       192.168.1.2
*.sub.domain.intra. 3600 IN    A       192.168.1.3
*.sub.domain.intra. 3600 IN    A       192.168.1.4
*.sub.domain.intra. 3600 IN    A       192.168.1.5

on Chrome it works, but with curl, firefox, wget and ping it doesn't.

$ ping access.domain.intra
ping: access.domain.intra: System error
$ wget -v access.domain.intra  
--2023-06-28 12:39:41--  http://access.domain.intra/
Resolving access.domain.intra (access.domain.intra)... failed: Success.
wget: unable to resolve host address ‘access.domain.intra’

I need to use *.sub.domain.intra to reach my cluster, but from a specific fqdn. Am I doing something wrong, or is there a better method?

I don't want to create, everytime I have a new site like access.domain.intra, 5 A Records. And I only want to update the A Records once with *.sub.domain.intra, when new nodes are added to the cluster.

Thanks!

Score:0
za flag

It should be set up in an opposite way:

access.domain.intra. A 192.168.1.1
                     A 192.168.1.2

; ...

*.sub.domain.intra. CNAME access.domain.intra.
Score:0
ws flag

While Nikita is partially correct, the reason is that you can't use a wildcard on the RHS of a DNS record. Chrome is being lax.

You need an explicit name for the CNAME values then point your wildcards and aliases to that. One way to achieve that would be Nikita's suggestion, but if you are adding the access.domain.intra to a domain which already contains these round robin records, then the record presumably has a different lifespan, hence I would use a new intermediate name:

access.domain.intra. 3600 IN    CNAME   multi.domain.intra.
*.sub.domain.intra. 3600 IN    CNAME   multi.domain.intra.
multi.domain.intra. 3600 IN    A       192.168.1.1
multi.domain.intra. 3600 IN    A       192.168.1.2
multi.domain.intra. 3600 IN    A       192.168.1.3
multi.domain.intra. 3600 IN    A       192.168.1.4
multi.domain.intra. 3600 IN    A       192.168.1.5
Nikita Kipriyanov avatar
za flag
I was too lazy to write a full blown explanation as to why is that :)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.