0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

実機検証:private DNS zone Aのcnameを利用して、private DNS zone BのAを解決

0
Last updated at Posted at 2026-06-02

背景:

プライベートDNSゾーンにはCNAMEが利用できそうですため、実機で検証してみました。
結果としては無事に成功です。

検証詳細

環境構築:
VM1台作成
Vnet1作成
pravite DNS zoneを2個作成:tanpdns.co.jp とtantest.private.comです。

作業:
1.2個のprivate DNS zoneをVnet1にリンクします。

2.適切にrecordを作成します。
tanpdns.co.jpにはcnameを作成します。念のためにTTLを1分間に設定しました。
image.png
tantest.private.comのゾーンにはA recordを作成します。
image.png

3.VMにログインして、nslookupを実施.無事にたどり着いたね。

[tanhiroshi@redhat80 ~]$ nslookup testtan2.tanpdns.co.jp
Server:168.63.129.16
Address:168.63.129.16#53

Non-authoritative answer:
testtan2.tanpdns.co.jpcanonical name = testtan2.tantest.private.com.
Name:testtan2.tantest.private.com
Address: 11.11.11.11

感想

なかなか便利ですね。自作 Private DNS Zone 同士は完全に連鎖できます。
testtan2.tanpdns.co.jp
→ CNAME → testtan2.tantest.private.com
→ A → 11.11.11.11

既定のAzure serviceのprivate DNS zoneが同様にcnmaeの利用ができますか。

進めて検証してみました。
今度はstorage accountの既定のprivate DNS zoneでcnameを設定しました。
image.png

結果としてはtesttan2.privatelink.blob.core.windows.netならいけます。
でもprivatelinkを抜いたらできなくなります。

[tanhiroshi@redhat80 ~]$ nslookup testtan2.blob.core.windows.net
Server:168.63.129.16
Address:168.63.129.16#53

** server can't find testtan2.blob.core.windows.net: NXDOMAIN

[tanhiroshi@redhat80 ~]$ nslookup testtan2.privatelink.blob.core.windows.net
Server:168.63.129.16
Address:168.63.129.16#53

Non-authoritative answer:
testtan2.privatelink.blob.core.windows.netcanonical name = testtan2.tantest.private.com.
Name:testtan2.tantest.private.com
Address: 11.11.11.11

追加検証:

こんな利用のシナリオもあると考えられます。
1.Windows DNS server(IP 10.0.0.4) を構築して、条件付きFowardを設定。
tanpdns.co.jpの場合、168へ転送します。
image.png

2.client VMのVnetにてcustom DNS serverを10.0.0.4に指定します。

3.Windows DNS serverのVNetに2個private DNS zoneをリンクします。
(tanpdns.co.jp とtantest.private.comです。cname設定済み)

4.Client VMから解決してみたら成功です。

[tanhiroshi@redhat80 ~]$ nslookup testtan2.tanpdns.co.jp
Server:10.0.0.4
Address:10.0.0.4#53

Non-authoritative answer:
testtan2.tanpdns.co.jpcanonical name = testtan2.tantest.private.com.
Name:testtan2.tantest.private.com
Address: 11.11.11.11

参照文章:
https://qiita.com/tanhiroshi/items/240e6a92a3bc535c46ee

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?