How do I use the Linode API to set my Reverse DNS (rDNS)?

Linode Staff

I recently obtained a pool of IPv6 addresses and I would like to automate the assignment of rDNS to addresses in this pool. How do I do this?

1 Reply

In order to assign rDNS for an IP address, you must make sure that the name you intend to use resolves to the IP address.

Getting Familiar with v4 of the Linode API

You can review the following guide:

Once you have an access token as described in the above guide you can then get the information needed to build your request to set reverse DNS. Documentation can be found here

Using the API to set the rDNS of your IPv6 address

You will need to replace three pieces of information in the example below:

  • $IPV6_ADDRESS
  • $DNS_NAME
  • $TOKEN (Your Access Token having read_write access to ips)
curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN \
    -X PUT -d '{
      "rdns": "$DNS_NAME"
    }' \
    https://api.linode.com/v4/networking/ips/$IPV6_ADDRESS

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct