Ir para o conteúdo
NimbusNexus

DNS reverso (registros PTR)

O DNS reverso é o hostname que alguém obtém ao perguntar "qual é o nome por trás deste IP?" — o inverso da resolução de DNS normal. Os registros ficam em uma árvore separada (in-addr.arpa. para IPv4, ip6.arpa. para IPv6) e são autoritativos para o bloco de IPs que cobrem.

Para a maioria das VMs, o DNS reverso padrão basta. Defina um PTR personalizado quando:

  • Você roda um servidor de e-mail. A maioria dos grandes provedores de e-mail rejeita e-mails de IPs cujo PTR não corresponde ao DNS direto do hostname de envio. Sem um PTR correspondente, sua taxa de entrega cai para zero.
  • Você está na allow-list de um parceiro que usa identificação baseada em PTR. Alguns firewalls fazem uma verificação com consulta reversa seguida de consulta direta para o TCP de entrada.

Há duas formas de definir um:

  • Em um IP flutuante. PUT /api/v1/ptr/records/set/{floatingip_id} define ou substitui o PTR dele, com o hostname de destino em ptrdname; PUT /api/v1/ptr/records/unset/{floatingip_id} o remove. O ID tem o formato <region>:<floating-ip-id>.
  • Em uma zona reversa que pertence ao seu projeto. POST /api/v1/zones/{zone_id}/ptr/ adiciona um conjunto de registros PTR para um ip, com o hostname de destino em records.

Próximos passos

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 →