|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: Setting a reverse IPv6 DNS record via the IPAM API |
| 4 | + description: This page explains how to set a reverse DNS record for an IPv6 address via the IPAM API |
| 5 | +content: |
| 6 | + h1: Setting a reverse IPv6 DNS record via the IPAM API |
| 7 | + paragraph: This page explains how to set a reverse DNS record for an IPv6 address via the IPAM API |
| 8 | +tags: ipv6 reverse dns instance eui-64 |
| 9 | +categories: |
| 10 | + - network |
| 11 | +dates: |
| 12 | + validation: 2025-03-19 |
| 13 | + posted: 2025-03-19 |
| 14 | +--- |
| 15 | + |
| 16 | +The Scaleway console allows you to [configure reverse DNS](/instances/how-to/configure-reverse-dns/) for flexible IP addresses. |
| 17 | + |
| 18 | +For IPv4 addresses, the console functionality is convenient. However, for IPv6 addresses the console only allows you to configure a single reverse DNS record for the entire /64 block, and not individual addresses within the block. |
| 19 | + |
| 20 | +You can solve this problem by using the IPAM API to set reverse DNS for individual addresses within your IPv6 block. IPAM is Scaleway's IP Address Manager tool, which acts as a single source of truth for all Scaleway IP addresses. |
| 21 | + |
| 22 | +<Macro id="requirements" /> |
| 23 | + |
| 24 | +- A Scaleway account logged into the [console](https://console.scaleway.com) |
| 25 | +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 26 | +- A public IPv6 address for an IPAM-compatible Scaleway resource (e.g an Instance) |
| 27 | + |
| 28 | +Use the [update an IP](https://www.scaleway.com/en/developers/api/ipam/#path-ips-update-an-ip) call to set the reverse of the desired IPv6 addresses. An example call is shown below. Replace `<ip-id>` with your flexible IPv6 address's IP ID, and modify the payload according to the domains and addresses you want to configure. |
| 29 | + |
| 30 | +<Message type="tip"> |
| 31 | +To find the IP ID for your address, use the [IPAM: List IPs](https://www.scaleway.com/en/developers/api/ipam/#path-ips-list-existing-ips) call. |
| 32 | +</Message> |
| 33 | + |
| 34 | +``` |
| 35 | +curl -X PATCH \ |
| 36 | + -H "X-Auth-Token: $SCW_SECRET_KEY" \ |
| 37 | + -H "Content-Type: application/json" \ |
| 38 | + "https://api.scaleway.com/ipam/v1/regions/fr-par/ips/{ip_id}" \ |
| 39 | + -d '{ |
| 40 | + "reverses":[ |
| 41 | + { |
| 42 | + "hostname":"reverse1.example.com", |
| 43 | + "address":"2001:db8::1" |
| 44 | + }, |
| 45 | + { |
| 46 | + "hostname":"reverse2.example.com", |
| 47 | + "address":"2001:db8::2" |
| 48 | + }, |
| 49 | + { |
| 50 | + "hostname":"reverse3.example.com", |
| 51 | + "address":"2001:db8::3" |
| 52 | + } |
| 53 | + ] |
| 54 | + }' |
| 55 | +``` |
0 commit comments