Replies: 5 comments
-
No, that's not possible. Also, it's not a restriction of dnspython; rather, this information is not available for lookup in the DNS. |
Beta Was this translation helpful? Give feedback.
-
Yeah, that is kind of what I thought, but I wanted to make sure. |
Beta Was this translation helpful? Give feedback.
-
As Peter said, this is generally not possible in the DNS as anyone can CNAME anywhere, and the target of a CNAME is not informed. The general problem would involve searching the entirety of the DNS, and the DNS has no way of expressing or executing that kind of query. It is, however, possible to use the DNS to store this information in certain situations. Like IP address forward and reverse mapping, if you control example.net and know that rstudio-example.net and jupyter-example.net point at example.net, you could add this to the example.net zone and then use the DNS to retrieve it.
Then a PTR query for |
Beta Was this translation helpful? Give feedback.
-
If I did have control over example.net, how would I have python DNS query it for this information, thank you in advance. |
Beta Was this translation helpful? Give feedback.
-
If you put "aliases-for-example" into the example.net zone like I suggested and keep it up-to-date, then
|
Beta Was this translation helpful? Give feedback.
-
in DNS Python, is there a way to search for a given A record or ANAME and get all of its CNAMES assosiated with it? I know that I can search for a CNAME and get the Arecord with it associated with it.
for example, say I have a server that is called example.net and I have a jupyter server on it that is jupyter-example.net
and jupyter-example.net is a CNAME that points to example.net. Also, say I have an rstudio server on there that is
rstudio-example.net that also points to example.net. I know if I do something like
cnames = dns.resolver.resolve("jupyter-example.net", 'CNAME',search=True)
exmaple.net will be in the cnames variable but is there a way to do something like
cnames = dns.resolver.resolve(" example.net", 'CNAME',search=True)
and get it to return
jupyter-example.net and rstudio-example.net and whatever other cnames might be on it?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions