DNSクエリに重複したドメイン名があります。

DNSクエリに重複したドメイン名があります。

tcpdumpRedHatサーバーからのキャプチャ中に、DNSクエリで奇妙な冗長ドメイン名が見つかりました。私のDNS名解決には何の影響もありません。

しかし、私のサーバーがDNSクエリ= =>からそのような要求を送信する理由は不明ですmy.domainspec.com.domainspec.com.domainspec.com。一般的に言えば、それだけmy.domainspec.com

tcpdumpの情報:

12:17:28.431208 IP (tos 0x0, ttl 64, id 57779, offset 0, flags [DF], proto UDP (17), length 97)
my.domainspec.com.33953 > ns1.entry.com.domain: [bad udp cksum 0xcb8a -> 0x6e04!] 63367+ A? my.domainspec.com.domainspec.com.domainspec.com. (69)`
`12:17:28.431718 IP (tos 0x0, ttl 64, id 61601, offset 0, flags [none], proto UDP (17), length 148)
    ns1.entry.com.domain > my.domainspec.com.33953: [udp sum ok] 63367 NXDomain* q: A? my.domainspec.com.domainspec.com.domainspec.com. 0/1/0 ns: domainspec.com. SOA ns1.entry.com. postmaster.domainspec.com. 2018012732 600 300 2592000 900 (120)

情報源nsswitch.conf:

 grep "hosts" /etc/nsswitch.conf
 #hosts:     db files nisplus nis dns
 hosts:      files dns myhostname

情報源/etc/hosts:

193.48.203.195  my.domainspec.com

情報源/etc/resolv.conf:

 # Generated by NetworkManager
 search domainspec.com
 nameserver 8.8.8.8

ご注意ください。例では、偽のドメイン名とIPを使用しました。

DNSクエリでドメイン名が重複する理由が何であるかを説明できる人はいますか?どんな助けでも大変感謝します。

ベストアンサー1

あなたが説明するアクションはほぼ正常であり、既知で文書化されたアクションです。

リゾルバがDNS名を解決できない場合は、それを確認してsearchディレクティブのすべてのドメインを元のクエリに順番に追加します(中間に一致するものがない場合)。

プロセス自体はやや複雑で、プロセスの再帰的性質のために複数の検索ドメインを組み合わせることができます。

DNS名を解決するときにドメイン拡張をある程度最小化/防止する方法は、ディレクティブsearch(または検索ドメインを構成するすべての場所)またはアプリケーションレベルでDNS /ドメイン名を「.」で終わることです。

良い:

search domainspec.com. domain.com. example.com.

または、たとえば、pingを実行するときにケースごとにドメイン検索の拡張を避けることができます。

ping www.example.com.

または

ping www.cnn.com.

~から男 resolv.conf(5)

ホスト名検索の検索リストです。

          The search list is normally determined from the local domain
          name; by default, it contains only the local domain name.
          This may be changed by listing the desired domain search path
          following the search keyword with spaces or tabs separating
          the names.  Resolver queries having fewer than ndots dots
          (default is 1) in them will be attempted using each component
          of the search path in turn until a match is found.  For
          environments with multiple subdomains please read options
          ndots:n below to avoid man-in-the-middle attacks and
          unnecessary traffic for the root-dns-servers.  Note that this
          process may be slow and will generate a lot of network traffic
          if the servers for the listed domains are not local, and that
          queries will time out if no server is available for one of the
          domains.

          The search list is currently limited to six domains with a
          total of 256 characters.

おすすめ記事