Jump to content
Калькуляторы

Вопрос по DNS-серверу для нескольких зон

Есть DNS-сервер, который обслуживает несколько зон. Например dom1.ru и dom2.ru.

Зоны выглядят примерно так:

DOM1.RU
-------

$TTL 1h

@   IN SOA    ns root    (...)
      NS     ns
      NS     ns01
      NS     ns02
      A      127.0.0.1
ns     A      1.2.3.4
ns01   A      1.2.3.4
ns02   A      1.2.3.5


DOM2.RU
-------

$TTL 1h

@   IN SOA    ns root    (...)
      NS     ns
      NS     ns01
      NS     ns02
      A      127.0.0.1
ns     A      1.2.3.4
ns01   A      1.2.3.4
ns02   A      1.2.3.5

Обратная зона выглядит примерно так:

$TTL 1h

@   IN SOA    ns.dom1.ru. root.dom1.ru.  (...)
      NS     ns.dom1.ru.
      NS     ns01.dom1.ru.
      NS     ns02.dom1.ru.
      A      127.0.0.1

$ORIGIN 3.2.1.in-addr.arpa.
4   PTR ns01.dom1.ru.
5   PTR ns02.dom1.ru.

 

Тут мне видится возможной проблемой то, что IP-адрес NS-серверов из зоны DOM2.RU будет ресолвиться в домен DOM1 (то есть ns.dom2.ru -> 1.2.3.4 -> ns.dom1.ru).

Стоит ли эту проблему как-то разрешить (навесить разные IP на один сервер, либо в SOA указывать FQDN ns.dom1.ru для всех доменов)?

Или можно оставить как есть?

Share this post


Link to post
Share on other sites

Во-первых, в родительской зоне существуют glue-записи (ns.dom1.ru A 1.2.3.4), а во-вторых - это совершенно обычная ситуация, когда домен обслуживается NS-ами под управлением третьей стороны.

 

Писать в SOA/NS FQDN с точкой в конце - вообще хорошая практика и способ избежать многих проблем.

Share this post


Link to post
Share on other sites

Понятно, спасибо за пояснения.

FQDN в SOA/NS действительно был бы правильнее, поправлю у себя.

 

Еще такой вопрос, я обычно в прямых зонах добавляю запись "@ A 127.0.0.1".

Но я уже не помню точно, зачем я так делаю — то ли где-то подобную рекомендацию читал, то ли у меня когда-то такая задача была, то ли просто копировал стартовую конфигурацию с какого-нибудь древнего BIND.

Есть ли в такой записи смысл?

Share this post


Link to post
Share on other sites

Тут мне видится возможной проблемой то, что IP-адрес NS-серверов из зоны DOM2.RU будет ресолвиться в домен DOM1 (то есть ns.dom2.ru -> 1.2.3.4 -> ns.dom1.ru).

 

Главное, что бы 1.2.3.4 -> ns.dom1.ru -> 1.2.3.4 корректно резолвился. :)

Share this post


Link to post
Share on other sites

Проверяю зону тут: http://www.intodns.com

Есть следующие ошибки:

Missing nameservers reported by parent

FAIL: The following nameservers are listed at your nameservers as nameservers for your domain, but are not listed at the parent nameservers (see RFC2181 5.4.1). You need to make sure that these nameservers are working.If they are not working ok, you may have problems!

ns01.dom2.ru

ns.dom2.ru

ns02.dom2.ru

 

Error Missing nameservers reported by your nameservers

ERROR: One or more of the nameservers listed at the parent servers are not listed as NS records at your nameservers. The problem NS records are:

ns01.dom1.ru

ns.dom1.ru

ns02.dom1.ru

This is listed as an ERROR because there are some cases where nasty problems can occur (if the TTLs vary from the NS records at the root servers and the NS records point to your own domain, for example).

 

Что тут неправильно?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.