PTR record can not be created

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.105
Virtualmin version 7.9.0
Related packages DNS

On the page “Create DNS Record” section “DNS record details”

When creating, I get an error:

Failed to save DNS record : Record name contains invalid characters

When I add “mail” in the “Record name” field, I get a different error:

Failed to save DNS record : Value must be an DNS name and end with a dot

I submitted an empty form with only a valid IPv4 in the “Reverse address” field.

Note: a PTR record should also accept a valid IPv6.

See also: Create DNS Record PTR

That’s obviously not valid. You need mail.domain.tld.

A PTR record is not part of an existing named forward zone, so, obviously you don’t have any domain for mail to be part of.

@CopyHosting,

A note about PTR records. Unless you OWN the IP address, or have been given the ability to manage these directly, you won’t be able to.

In most cases, the ISP owns the IP address (where your server is hosted) and therefore either they have to setup the PTR for you on their DNS server, or in some cases they’ll provide an interface for you to do so yourself, but again this record is NOT managed on YOUR server generally speaking.

@Joe that is in the input field; the domain (note: with dot by the way) is listed behind the input field and is uneditable. I would assume that the CGI script will make “mail” from the input field into a proper “mail.domain.tld.” PTR record.

@tpnsolutions Normally, that would indeed not be the case. I have it indirectly delegated. A script runs to sync them. But even if I would trigger on another field in the DNS, Virtualmin should work and not give this error, right?

@CopyHosting,

The period “.” at the end of the domain “mail.domain.tld.” is intentional, that’s a BIND (DNS Server) thing. It signifies the end of the host record.

If left as “mail.domain.tld” the resulting record to BIND would be “mail.domain.tld.domain.tld”

As I said, in the GUI, the dot is not there + I get the error no matter what I try to enter in this form.

image

Oh, I thought you were in Webmin’s BIND module creating a reverse zone!

So this is somewhat different. Though I’m not sure what this form does or expects, I’ve never actually used it. It’s kind of misleading about how a PTR record works. PTR records aren’t part of a forward zone (e.g. example.com) so it’s misleading that it presents it as such, I think. Though, I think I get what it’s trying to do, I’m worried it’s gonna lead people to think you can have a different one for every zone on one IP, which isn’t possible.

I’m going to have to poke around. Maybe @Ilia or @Jamie has insight on what this is expecting here. To me, this form doesn’t actually make sense, so I’m kinda guessing.

There is an odd case in which a PTR record can be in a forward zone, if your ISP or hosting compare creates a CNAME in a reverse zone pointing to it. This is a super-rare case though that you almost certainly don’t want to use…

2 Likes

:exploding_head:

I had no idea that was a thing.

1 Like

I thought you told me about it years ago actually!

That said, I think there’s no good reason to include PTR records in the list of types that can be created in Virtualmin’s DNS Records page, because this is a super-obscure use case that probably just confuses people.

1 Like

lol. That’s possible. I have forgotten far more than I remember about just about everything. DNS is something I mostly have forgotten since I no longer maintain any serious DNS servers.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.