| タイプ | 名前 | 内容 |
|---|---|---|
A | ns1.example.com | <IPv4> |
テナント custom nameservers (TCNS) allow you to define テナント-level custom nameservers and use them for different アカウント within a Cloudflare テナント .
TCNS are organized in different sets (ns_set) and TCNS names can be provided by any domain, even if the domain does not exist as a zone in Cloudflare.
For instance, if the TCNS are ns1.example.com and ns2.vanity.org, the domains example.com and vanity.org are not required to be zones in Cloudflare.
この設定を可能にするためには、いくつかの条件が適用されます:
ns_name), and each name cannot belong to more than one set. For example, if ns1.example.com is part of ns_set 1 it cannot be part of ns_set 2 or vice versa.ns_set) than their parent, child, or any other zone in their direct hierarchy tree.テナント owners that want to use their own IP prefix for the テナント custom nameservers should contact their account team.
アカウントオーナーであり、あなたのアカウントがカスタムネームサーバーを持つテナントの一部である場合、次の手順を実行してください:
ns_typeとns_setを指定します。curl --request PUT https://api.cloudflare.com/client/v4/zones/{zone_id}/custom_ns \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>" \--header "Content-Type: application/json" \--data '{ "enabled": true, "ns_type": "tenant", "ns_set": <SET>}'パラメータns_typeが省略された場合、デフォルトのタイプaccountが割り当てられます。
パラメータns_setが省略された場合、デフォルトのセット1が割り当てられます。
今後、あなたのアカウントに追加されるすべての新しいゾーンのデフォルトネームサーバーとしてこれらのTCNSを設定するには、アカウント更新エンドポイントを使用し、default_nameserversの値をcustom.tenantに設定します。
ゾーンからTCNSとその関連DNSレコードを削除するには、PUTコマンドを使用します。
Cloudflare Registrarを使用していない場合は、ドメインのレジストラでもTCNSを削除してください。
テナントオーナーであり、あなたのテナント内のアカウントにTCNSを利用可能にしたい場合は、次の手順を実行してください:
ns_nameとns_setの条件を確認し、次のPOSTコマンドを使用してテナント内にTCNSを作成します:curl https://api.cloudflare.com/client/v4/tenants/{tenant_id}/custom_ns \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>" \--header "Content-Type: application/json" \--data '{ "ns_name": "<NS_NAME>", "ns_set": <SET>}'アカウントカスタムネームサーバーとIPアドレスをドメインのレジストラにグルーレコード(AおよびAAAAレコード) ↗として追加します。
テナントカスタムネームサーバーに使用されるドメインが同じアカウント内に存在しない場合は、設定されたネームサーバー名(例:ns1.example.com)でA/AAAAレコードを権威DNSプロバイダーに作成する必要があります。
| タイプ | 名前 | 内容 |
|---|---|---|
A | ns1.example.com | <IPv4> |
テナントアカウント内のすべてのTCNS名のリストを取得するには、次のAPIリクエストを使用します:
curl https://api.cloudflare.com/client/v4/tenants/{tenant_id}/custom_ns \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"