• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Customizing DNS - help needed

C

cozmo@

Guest
Hi all,

I was wondering if anyone could tell me where I can edit what Plesk should be writing to file when a new domain has been added or an existing domain has been modified.

Basically, what it does at this stage when a new domain has been added, by default, is:

1) in /var/named/run-root/etc/named.conf:
-Adds the domain
-Include all my name servers in allow-transfer
-Modifies options
-Clears common-allow-transfer

2) in /var/named/run-root/var/xxx.xx.xx.in-addr.arpa:
-Adds a PTR record of the domain

3) in /var/named/run-root/var/domain.tld
-Adds the record as specified in the DNS template

What I would want it to do is:

1) 1) in /var/named/run-root/etc/named.conf:
-Add the domain
-Include common-allow-transfer instead of all my name servers in allow-transfer
-NOT Modify options
-NOT clear common-allow-transfer
-Just leave everything else as it is

2) in /var/named/run-root/var/xxx.xx.xx.in-addr.arpa:
-NOT add a PTR record of the domain
-Just leave everything as it is

3) in /var/named/run-root/var/domain.tld
-Add the record as specified in the DNS template

Could anyone here give me a hint how to solve this issue?

Thanks,
/j.
 
Thanks for your comment breun. I've managed to solve a few things now:

1) in /var/named/run-root/etc/named.conf:
-Adds the domain - WORKING - ...and always was.
-Include all my name servers in allow-transfer - NOT WORKING - It still does that. If I remove the NS entries from a domain's DNS template, then it leaves the allow-transfer alone, but then it obviously exclude the NS entries from the SOA record, which is bad. This is not too serious though, and something I could live with.
-Modifies options - WORKING - It leaves my settings alone now. Not sure why it stopped removing them.
-Clears common-allow-transfer - WORKING - These values can be set in the DNS Settings -> Common ACL.

2) in /var/named/run-root/var/xxx.xx.xx.in-addr.arpa:
-Adds a PTR record of the domain - WORKING - As breun pointed out, simply removing the PTR record from the template solves this.
-Leave everything as it is - NOT WORKING - It still remove my NS records and only leaves the NS record for the server, e.g.:
Code:
; *** This file is automatically generated by Plesk ***
$TTL    86400

@       IN      SOA     [url]www.domain.tld.[/url] hostmaster.domain.tld. (
                        1182210008      ; Serial
                        10800   ; Refresh
                        3600    ; Retry
                        604800  ; Expire
                        10800 ) ; Minimum 

                 IN NS   [url]www.domain.tld.[/url]
100              IN PTR  domain.tld.

But I need it to keep other values, e.g.:
Code:
; *** This file is automatically generated by Plesk ***
$TTL    86400

@       IN      SOA     [url]www.domain.tld.[/url] hostmaster.domain.tld. (
                        1182210008      ; Serial
                        10800   ; Refresh
                        3600    ; Retry
                        604800  ; Expire
                        10800 ) ; Minimum 

                 IN NS   [url]www.domain.tld.[/url]
                 IN NS   ns1.domain.tld.
                 IN NS   ns2.domain.tld.
                 IN NS   ns3.domain.tld.
                 IN NS   ns4.domain.tld.
100              IN PTR  domain.tld.

And I can't for the world figure out how to make Plesk not touching those values, or include them everytime it rewrites the in-addr.arpa files.

3) in /var/named/run-root/var/domain.tld
-Adds the record as specified in the DNS template - WORKING - ...and always was.

Any ideas anyone, how to solve those last bits?

Thanks,
/j.
 
The file says *** This file is automatically generated by Plesk ***, so never expect changes to a file like that to stick. Add all DNS records via the Plesk web interface.
 
Yea, that's what it seems like, so I wonder where in Plesk could I add those extra records so they don't disappear everytime DNS is being updated?
 
The files I;m talking about are the in-addr.arpa files - not the domain.tld files., so that doesn't quite work.

If I add PTR records, then yes, I can see them being added to the in-addr.arpa files, but I can't seem to add any other values to those files, and that is exactly what I need.

All it does is that it adds, as I wrote in my example:
IN NS www.domain.tld.

which would be the hostname of the server, but I also need it to add:

IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN NS ns3.domain.tld.
IN NS ns4.domain.tld.

And I can't figure that one out.
 
well, those would be my four name servers, and being somewhat less experienced in named, I just followed the advice from someone more experienced saying that I should have the four DNS servers in the in-addr.arpa files. It would probably have something to do with saying to the world that these are the public nameservers of my system.
 
Just add NS records through Plesk. I have never had to specify nameservers in those files. Of course you still need to tell your domain registry what your domain's nameservers are.
 
Yea, the nameservers are regged, working and serving sites. And the NS records are there, in Plesk, for all domains.

However, the reason I want those in the reverse lookup is simply because a) I don't want to risk having authorative nameservers reject my name servers, and b) all nameserver setup examples (that I've seen) tells you that you should have your name servers specifed in the reverse (in-addr.arpa) files.

So I need to figure out (which seems quite tricky) how to make Plesk include those records in the reverse files (possibly by determining how it adds the single NS record).

I was hoping that someone here would know this.

Thanks,
/j.
 
Are those nameservers on the same (physical server)?

Resistance is futile your site will be hosted!
 
Yes they are.

I have four name servers in two sub class nets on the same physical machine.

...and, well, I am aware of that the name servers should be on different machines and ideally different geographical locations, but that'll be a matter for the future.

Thanks,
Johan
 
Hi Johan,
Wasn't judging, just curious.
I agree that we should be able to have more than one NS record in the reverse file editable through the admin panel. Having only the master server in the reverse file is ok unless dns for those 2 subnets are delegated to you.
 
Hi,

I just added that (geographical) comment in a preventative measure, should anyone feel inclined to state the obvious. ;-)

So from your comment I take it, I should be fine leaving it as is - no registrar will consider the name servers "dodgy" or improperly configured in any way because of this (when registering new domain names using these nameservers)?

Thanks,
/j.
 
Ah ya.

Well, it actually seems to be ok according to DNS Report.

But yea, it would be a good feature to be able to add additional NS records in the reverse files from the admin panel - maybe we'll see that sometime in the future.

Breun and Raymond, thanks a lot for your help in these matters - much appreciated.

Cheers,
Johan
 
Back
Top