Перейти до вмісту
NimbusNexus

Зворотний DNS (записи PTR)

Зворотний DNS — це імʼя хоста, яке отримує той, хто питає: «Яке імʼя стоїть за цим IP?» Це протилежність звичайному DNS-розвʼязанню. Записи містяться в окремому дереві (in-addr.arpa. для IPv4, ip6.arpa. для IPv6) і є авторитативними для блоку IP, який вони охоплюють.

Для більшості VM достатньо зворотного DNS за замовчуванням. Налаштуйте власний PTR, коли:

  • Ви запускаєте поштовий сервер. Більшість великих поштових провайдерів відхиляють листи з IP, чий PTR не збігається з прямим DNS імені хоста відправника. Без відповідного PTR частка доставлених листів падає до нуля.
  • Партнер додав вас до списку дозволених за ідентифікацією на основі PTR. Деякі фаєрволи для вхідного TCP перевіряють адресу спершу зворотним, а потім прямим DNS-запитом.

Налаштувати його можна двома способами:

  • Для плаваючого IP. PUT /api/v1/ptr/records/set/{floatingip_id} встановлює або замінює його PTR, а цільове імʼя хоста передається в ptrdname; PUT /api/v1/ptr/records/unset/{floatingip_id} видаляє PTR. ID має формат <region>:<floating-ip-id>.
  • У зворотній зоні, якою володіє ваш проєкт. POST /api/v1/zones/{zone_id}/ptr/ додає набір записів PTR для ip, а цільове імʼя хоста передається в records.

Що далі

Reference

GET/api/v1/ptr/records/

List Ptr Records

Lists reverse-DNS PTR records mapped to the project's floating IPs.

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/ptr/records/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/ptr/records/set/{floatingip_id}

Set Ptr Record

Sets or replaces the reverse-DNS PTR record for the given floating IP.

Parameters

NameInTypeDescription
floatingip_id*pathstringCompound floating IP identifier in the form `<region>:<uuid>`

Request body

FieldTypeDescription
ptrdname*stringTarget FQDN for PTR
descriptionstring | nullOptional human-readable description
ttlinteger | nullTTL in seconds; set to null to clear

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/ptr/records/set/<floatingip_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ptrdname": "example"
  }'
PUT/api/v1/ptr/records/unset/{floatingip_id}

Unset Ptr Record

Clears the reverse-DNS PTR record bound to the given floating IP.

Parameters

NameInTypeDescription
floatingip_id*pathstringCompound floating IP identifier in the form `<region>:<uuid>`

Responses

  • 204Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation Error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/ptr/records/unset/<floatingip_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/ptr/records/{floatingip_id}

Get Ptr Record

Retrieves the reverse-DNS PTR record bound to the given floating IP.

Parameters

NameInTypeDescription
floatingip_id*pathstringCompound floating IP identifier in the form `<region>:<uuid>`

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/ptr/records/<floatingip_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/zones/{zone_id}/ptr/

List Ptrs

Lists PTR records in the specified zone owned by the calling project.

Parameters

NameInTypeDescription
zone_id*pathstringParent zone ID
admin_domainquerystring | null—
admin_projectquerystring | null—
limitqueryinteger | null—
markerquerystring | null—
sort_dirquerystring | null—
sort_keyquerystring | null—
namequerystring | null—
typequery"PTR" | null—
ttlqueryinteger | null—
statusquerystring | null—
descriptionquerystring | null—

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/zones/<zone_id>/ptr/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/zones/{zone_id}/ptr/

Create Ptr

Creates a PTR record within the specified DNS zone.

Parameters

NameInTypeDescription
zone_id*pathstringParent zone ID

Request body

FieldTypeDescription
records*array of stringExactly one PTR target FQDN (e.g. ['host.example.com.'])
ttlinteger | nullTTL for the recordset
descriptionstring | nullHuman-readable description
ip*stringIP for FQDN conversion

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/zones/<zone_id>/ptr/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [
      "example"
    ],
    "ip": "example"
  }'
GET/api/v1/zones/{zone_id}/ptr/{recordset_id}

Get Ptr

Retrieves a single PTR record by zone and recordset identifiers.

Parameters

NameInTypeDescription
zone_id*pathstringParent zone ID
recordset_id*pathstringPTR record ID

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/zones/<zone_id>/ptr/<recordset_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/zones/{zone_id}/ptr/{recordset_id}

Update Ptr

Updates an existing PTR record in the specified zone.

Parameters

NameInTypeDescription
recordset_id*pathstringRecordset ID
zone_id*pathstringParent zone ID

Request body

FieldTypeDescription
recordsarray of string | nullExactly one PTR target FQDN (e.g. ['host.example.com.'])
ttlinteger | nullTTL for the recordset
descriptionstring | nullHuman-readable description

Responses

  • 202Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/zones/<zone_id>/ptr/<recordset_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/zones/{zone_id}/ptr/{recordset_id}

Delete Ptr

Deletes a PTR record from the specified DNS zone.

Parameters

NameInTypeDescription
recordset_id*pathstringRecordset ID
zone_id*pathstringParent zone ID

Responses

  • 202Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation Error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/zones/<zone_id>/ptr/<recordset_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →