Aller au contenu
NimbusNexus

DNS inverse (enregistrements PTR)

Le DNS inverse, c’est le nom d’hôte qu’obtient quelqu’un qui demande « quel est le nom derrière cette IP ? » — l’inverse de la résolution DNS normale. Les enregistrements vivent dans une arborescence distincte (in-addr.arpa. pour IPv4, ip6.arpa. pour IPv6) et font autorité pour le bloc d’IP qu’ils couvrent.

Pour la plupart des VM, le DNS inverse par défaut convient. Définissez un PTR personnalisé quand :

  • Vous exploitez un serveur de messagerie. La plupart des grands fournisseurs de messagerie rejettent le courrier provenant d’IP dont le PTR ne correspond pas au DNS direct du nom d’hôte d’envoi. Sans PTR correspondant, votre taux de livraison tombe à zéro.
  • Un partenaire vous autorise sur la base d’une identification par PTR. Certains pare-feu vérifient le trafic TCP entrant par une recherche inverse suivie d’une recherche directe.

Il y a deux façons d’en définir un :

  • Sur une IP flottante. PUT /api/v1/ptr/records/set/{floatingip_id} définit ou remplace son PTR, avec le nom d’hôte cible dans ptrdname ; PUT /api/v1/ptr/records/unset/{floatingip_id} le supprime. L’ID a la forme <region>:<floating-ip-id>.
  • Dans une zone inverse qui appartient à votre projet. POST /api/v1/zones/{zone_id}/ptr/ ajoute un jeu d’enregistrements PTR pour une ip, avec le nom d’hôte cible dans records.

Étapes suivantes

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 →