0

Although I have a specific problem, I am trying to implement a good strategy for the domains I manage.

Current setup:

A VPS managed with Plesk with multiple domains. (I do have a failover IPv4.)

The main nameserver is a glue record that points to the VPS ipv4 and ipv6.

Initially I tried to just glue a secondary name server to the same IP, but the TLD I use requires 2 name servers with distincts IP addresses.

So, for the secondary name server, my VPS provider (OVH Cloud) provides a secondary DNS, but it only links the domain to an IPv4 and does not allow for any specific zone configuration.

Plesk is the Primary DNS server and there are multiple records added. One of them is the SPF record.

Problem:

It seems that during the DNS propagation, some "top level" DNS servers are setting the NameServers backward: the secondary DNS server is used first.

When this happen, my DNS records from my primary DNS server are not being served. For example, running mxtoolbox will give me errors as it can't find the SPF record from the primary server.

** Solutions: **

Is there a way to have the primary DNS server push his zone configuration to the secondary DNS server?

Alternatively, is there a way to enforce which is the primary name server and which is the secindary name server? (I consider this acceptable as the primary name server and the actual hosting is done by the same server. In most cases if the primary DNS server fails, so does the content and other services)

2
  • 1
    "are setting the NameServers backward" There is no order in the DNS. records are sets, not lists. There is, outside, no "priority" between nameservers authoritative on a zone they should all reply the same way for the same query, and they will be all used (it is load balancing, not fall back behaviour) Jan 4, 2021 at 16:40
  • @patrick mevzek: you are correct, I always assumed wrong because we are presented with ns1 and ns2 and my hostibg provider allow us to use their "secondary dns" server as a second dns server. Where as Plesk lets you select which of the two is the "Primary" dns server.( nothing to do with primary vs slave). Got sucked into thinking it ns2 was a fallback.
    – FMaz008
    Jan 5, 2021 at 16:36

1 Answer 1

2
  1. The typical way for a primary nameserver to push the config to a secondary is using AXFR. So yes, this is possible.

  2. In terms of NS reords, there is no distinction between a primary record and a secondary record. They may be accessed sequentially in either order or simultaneously. To enforce one, you would need to remove the other record.

2
  • Thanks! How long does it take to sync? For the next person facing this issue, I found some instructions for Plesk: go to Tools & Settings, click on DNS Zone Template and take a look for the Transfer Restriction Template. Add the IP for your "ns2".
    – FMaz008
    Jan 4, 2021 at 15:04
  • 2
    @FMaz008 If using NOTIFY (where the primary/master sends out a notification when the zone changes) it typically takes seconds, this is generally best practice. If not using NOTIFY it takes up to the value specified in SOA.REFRESH (specified in seconds, often something like an hour) before the secondary/slave checks on its own if the zone has changed. Jan 4, 2021 at 15:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .