GigakubeWikigigakube.ch →Menu ↓

Reverse DNS (PTR)

The name returned to anyone asking "what is this address called?": every public address has a generic one, and you can give it your own.

What it is for

Reverse DNS (PTR records) gives the name of an IP address. It matters above all for mail servers: many mail servers reject, or put in spam, messages coming from an address without a sensible name, or with a name that does not match. It also helps to recognise machines in logs and in traceroute.

The generic name

Every Gigakube public address already has a name, written by the platform: the address with hyphens instead of dots, followed by the zone's domain. For example the address 31.44.45.12 is called:

31-44-45-12.gk01.ch

The generic name works both ways: 31-44-45-12.gk01.ch answers with the IPv4 address (and with the server's IPv6, if it has one), and the address answers with that name. It is the reverse DNS until you ask for another one.

Giving it your own name

You can ask for a server's public address to be called, for example, mail.example.ch. The name applies to the server's IPv4 and, if there is one, to its IPv6.

The rule: the name only applies when it really points to the address. That is, in public DNS, mail.example.ch must have an A record with the server's IPv4 address (or an AAAA record with its IPv6). This is called forward-confirmed reverse DNS, and it stops anyone from taking someone else's name (spam, phishing).

The steps:

  1. Write the A record for the name pointing to the server's address, wherever your domain's zone lives. If the zone is with us: DNS, Add record, type A, name mail, value the server's address. If you like, an AAAA pointing to the IPv6 too.
  2. Ask for the name for the server (see below how).
  3. Wait: within a minute of the name pointing to the address, the reverse DNS becomes yours.

Until the name points to the address, the generic name stays and the server shows the requested name as pending (reverse_dns_pending). As soon as the check succeeds, your name becomes the current one (reverse_dns).

Good to know:

How to ask

The New server form and the server page in the panel do not have a field for reverse DNS today: use one of the two ways above.

Full example: a mail server

  1. Create the server mail with a public address and open the ports you need (25, 465, 587, 993…), saying from where (Firewall).
  2. In the zone example.ch: A record mail → the server's IPv4 address (and AAAA → IPv6, if it has one); MX record @ → 10 mail.example.ch.
  3. Ask for the reverse DNS mail.example.ch for the server mail.
  4. After a minute, check:
dig +short -x <server address>     # must answer mail.example.ch.
dig +short mail.example.ch         # must answer the server's address

For developers

Cloud/setReverseDns (MCP tool cloud_set_reverse_dns), operator role:

Field What
server_id The server
name The name, for example mail.example.com; empty to go back to the generic name
dry_run true to see the plan only
curl -s https://gigakube.ch/api/rpc \
  -H "Authorization: Bearer $GIGAKUBE_API_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"Cloud/setReverseDns","params":{"call_data":{"server_id":"<id>","name":"mail.example.ch"}}}'

The response gives address, address6, the requested name (requested, null for the generic one), the generic name (generic) and in needs what has to point where, for example mail.example.ch A 31.44.45.12.

At creation: Cloud/createServer with "reverse_dns": "mail.example.ch" (requires public_ip).

In the server list (Cloud/getServerList) and in the details, each server has: