■前提
VCNリゾルバはDNSのクエリをフォワーディングできますが、フォワーディングされたものをリゾルバがさらにフォワーディングできるのかやってみました。
例えば、オンプレミスからHub VCNのリゾルバを通ってSpoke VCNにフォワーディングするといった構成です。

■構成
VCN2 → On-Premises
VCN21 → Hub VCN
VCN22 → Spoke VCN
の想定で以下の構成です。
- VCN2からVCN21を経由してVCN22のプライベートビューを参照したい
- そのためにリスニングエンドポイント、フォワーディングエンドポイント、フォワーディングルールを設定
- VCN22のプライベートビューにexample22.comゾーンを作成し、www.example22.com→10.22.0.111というAレコードを追加
- サブネットはパブリックサブネット
- サブネットに紐づくルート表は10.0.0.0/8→DRG
- サブネットに紐づくセキュリティリストはイングレスルール10.0.0.0/8は全許可
- (後々意味がないと分かったが)VCN2 → VCN22に直接行けないようにDRGルート表を設定
- 各リゾルバのログを有効化
■コンソールで設定
※メモ程度の内容です
■結果
フォワーディングのフォワーディングは可能でした。
vcn2のインスタンスからnslookup
[opc@ins-vcn2 ~]$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000
inet 10.2.0.240 netmask 255.255.255.0 broadcast 10.2.0.255
[opc@ins-vcn2 ~]$ nslookup www.example22.com
Server: 169.254.169.254
Address: 169.254.169.254#53
Non-authoritative answer:
Name: www.example22.com
Address: 10.22.0.111
リゾルバのログ
ログからもフォワーディングされていることが分かります。
(展開ください) VCN2のリゾルバのログ
{
"datetime": 1761615204846,
"logContent": {
"data": {
"additionalCount": 0,
"answer": "[A 10.22.0.111]",
"answerCount": 1,
"authorityCount": 0,
"dataschema": "1.1",
"destinationAddress": "169.254.169.254", ★VCN2のリゾルバ
"destinationPort": "53",
"forwardDestinationAddress": "10.21.0.21", ★VCN21のlisteningエンドポイント
"forwardDestinationPort": 53,
"forwardSourceAddress": "10.2.0.2", ★VCN2のforwardingエンドポイント
"latency": 10,
"messageId": 58156,
"path": "rule:forwarded",
"protocol": "udp",
"qclass": "IN",
"qname": "www.example22.com.",
"qtype": "A",
"rcode": "0",
"rcodeName": "NOERROR",
"sourceAddress": "10.2.0.240",
"sourcePort": 35227,
"ttl": 3600
・・・
"type": "com.oraclecloud.dns.private.resolver"
},
"regionId": "ap-osaka-1"
}
(展開ください) VCN21のリゾルバのログ
{
"datetime": 1761615204843,
"logContent": {
"data": {
"additionalCount": 0,
"answer": "[A 10.22.0.111]",
"answerCount": 1,
"authorityCount": 0,
"dataschema": "1.1",
"destinationAddress": "10.21.0.21", ★VCN21のlisteningエンドポイント
"destinationPort": "53",
"forwardDestinationAddress": "10.22.0.22", ★VCN22のlisteningエンドポイント
"forwardDestinationPort": 53,
"forwardSourceAddress": "10.21.0.22", ★VCN21のforwardingエンドポイント
"latency": 6,
"messageId": 63732,
"path": "rule:forwarded",
"protocol": "udp",
"qclass": "IN",
"qname": "www.example22.com.",
"qtype": "A",
"rcode": "0",
"rcodeName": "NOERROR",
"sourceAddress": "10.2.0.2",
"ttl": 3600
},
・・・
"type": "com.oraclecloud.dns.private.resolver"
}
}
(展開ください) VCN22のリゾルバのログ

{
"datetime": 1761615204841,
"logContent": {
"data": {
"additionalCount": 0,
"answer": "[A 10.22.0.111]",
"answerCount": 1,
"authorityCount": 0,
"dataschema": "1.1",
"destinationAddress": "10.22.0.22", ★VCN22のリスニングエンドポイント
"destinationPort": "53",
"latency": 1,
"messageId": 56292,
"path": "private",
"protocol": "udp",
"qclass": "IN",
"qname": "www.example22.com.",
"qtype": "A",
"rcode": "0",
"rcodeName": "NOERROR",
"sourceAddress": "10.21.0.22", ★VCN21のforwardingエンドポイント
"ttl": 3600
},
・・・
"type": "com.oraclecloud.dns.private.resolver"
}
}
■代替案
リゾルバにはプライベートビューの関連付けというものがあります。
これを使えば、フォワーディングをしなくてもVCN2のリゾルバだけで名前解決できました。DRGへの通信は発生していません。

-
VCN22プライベートビューに対して、example22associate.comのゾーンを追加し、www.example22associate.com→10.22.0.222のAレコードを追加

-
結果、名前解決できました。
vcn2のインスタンスからnslookup
[opc@ins-vcn2 ~]$ nslookup www.example22associate.com
Server: 169.254.169.254
Address: 169.254.169.254#53
Non-authoritative answer:
Name: www.example22associate.com
Address: 10.22.0.222
- VCN2のリゾルバのログ
(展開ください) VCN2のリゾルバのログ
{
"datetime": 1761620949998,
"logContent": {
"data": {
"additionalCount": 0,
"answer": "[A 10.22.0.222]",
"answerCount": 1,
"authorityCount": 0,
"dataschema": "1.1",
"destinationAddress": "169.254.169.254",
"destinationPort": "53",
"latency": 1,
"messageId": 50489,
"path": "private",
"protocol": "udp",
"qclass": "IN",
"qname": "www.example22associate.com.",
"qtype": "A",
"rcode": "0",
"rcodeName": "NOERROR",
"sourceAddress": "10.2.0.240",
"sourcePort": 52827,
"ttl": 3600
},
・・・
"regionId": "ap-osaka-1"
}
(参考)
■まとめ
- フォワーディングされたクエリをさらにフォワーディングすることは可能
- プライベートビューの関連付けでも同じようなことは可能







