Hetzner – copy IPv6 Reverse-DNS


You can continue to use the old IPv4 subnet with a new server at Hetzner. With IPv6, it does not work unfortunately. Although I do not understand why I can keep all IPv4 (subnet and / or single), but not the IPv6 addresses.

It’s annoying when you have to change all IPv6 addresses in DNS. But if this is (indirectly) controlled via a database that has happened in a few seconds.

To create 30 or more RDNS records manually in the robot was me a little too goofy. I have written a small php script that reads RNDS records from the old server and then (with changed Subnet) applies them to the new server. As long as both servers are managed under the same account, it works well.

You have to adjust a few values:
$login = "robot-username";
$password = "robot-password";
$old = "eeee:eeee:eeee:eeee";
$new = "ffff:ffff:ffff:ffff";

Afterwards run php -q migrate_rdns.php

The rdns records from the old server will not be deleted. I always cancel an old server with a few days transition so i do not longer use the old records.

Download via git: git clone https://git.schaal-24.de/scripts/scripts.git
Archive: rdns_hetzner.tgz

Leave a comment

Your email address will not be published. Required fields are marked *

I confirm