[Pdns-users] Creating a www CNAME in powerDNS Admin (mysql backend) automatically pointing to @
Andrea Biancalani
a.biancalani at conmet.it
Mon Jan 23 12:10:07 UTC 2023
Il 23/01/2023 10:32, Brian Candler ha scritto:
> On 23/01/2023 08:39, Andrea Biancalani via Pdns-users wrote:
>>
>> Hello there,
>>
>> do you know if it is possible with pdns Admin GUI (using mysql backend)
>
> Questions about a particular third-party project which integrates with
> PDNS would be better raised with that third-party project.
>
> There are dozens of admin web interfaces:
>
> https://github.com/PowerDNS/pdns/wiki/WebFrontends
>
> If you are talking about the one called "PowerDNS-Admin" then it has
> its own discussion forum here:
>
> https://github.com/PowerDNS-Admin/PowerDNS-Admin/discussions
>
Hello,
yeah, I'm talkin' about the latter one, I'll bookmark that link for
future needs (thanks!).
Answering below for further investigations...
>>> @ IN A 1.2.3.4
>>> www IN CNAME *foo.bar*.
>>
>> so how can I create a functional template to auto add the www record
>> in my template based on domain name? Or... can I solve this using an
>> ALIAS type or something different?
>
> Suppose you had a template like this:
>
> @ SOA ...
> @ NS ...
> @ MX ...
> @ A 192.0.2.1
> @ AAAA 2001:db8::1
> www A 192.0.2.1
> www AAAA 2001:db8::1
>
> An alias record can be used to simplify it to:
>
> @ SOA ...
> @ NS ...
> @ MX ...
> @ ALIAS www
> www A 192.0.2.1
> www AAAA 2001:db8::1
>
You got the point, my default template for new hosting is similar to this
> @ SOA ...
> @ NS ...
> @ MX ...
> @ A 192.0.2.1
> @ AAAA 2001:db8::1
> www A 192.0.2.1
> www AAAA 2001:db8::1
but if I try to use this template
> @ SOA ...
> @ NS ...
> @ MX ...
> @ ALIAS www. /*(added final dot)*/
> www A 192.0.2.1
> www AAAA 2001:db8::1
I can resolve the www.foo.bar record, but when trying to resolve foo.bar
I get a "Server failed" answer ( dns-server is not able to find foo.bar)
Using instead the webhost server name it can be correctly resolved, so
using below sample, is working
> Or even:
>
> @ SOA ...
> @ NS ...
> @ MX ...
> @ ALIAS webhost.mycompany.com.
> www ALIAS webhost.mycompany.com. ; see [note] below
>
> Behind the scenes, the auth server does a recursive lookup for the
> ALIAS target and returns the A/AAAA records as if authoritative. It
> can be used to avoid duplicating IP addresses across many zone files.
>
Trying to use a template like this instead, gave as result a "RRset
foo.bar. IN CNAME: Conflicts with pre-existing RRset"
> @ SOA ...
> @ NS ...
> @ MX ...
> @ CNAME www. /*(added final dot)*/
> www A 192.0.2.1
> www AAAA 2001:db8::1
that doesn't happens if I use the zone record as target of the CNAME
> @ SOA ...
> @ NS ...
> @ MX ...
> @ CNAME foo.bar. /*(added final dot)*/
> www A 192.0.2.1
> www AAAA 2001:db8::1
I suppose this behavior is totally correct, so I'm asking if the best
solution for my case is just pointing new zones to the template that
contains ALIAS to webhost server name, to avoid specifing foo.bar as
CNAME or ALIAS record for a non-www standard record.
Is this fine I suppose, isn't it?
Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20230123/ffde5761/attachment.htm>
More information about the Pdns-users
mailing list