Set Up a Secondary Zone

This tutorial explains how to set up a secondary zone in IONOS Cloud by running a BIND9 server on an Ubuntu operating system.

Target audience

This tutorial is intended to help both developers and technical decision-makers.

What will you learn

By the end of the tutorial, you will learn how to set up the following:

  1. Set up a Dedicated Core server in IONOS Cloud.

  2. Configure a primary nameserver on a Dedicated Core Serverarrow-up-right in IONOS Cloud running a BIND9 server on an Ubuntu operating system.

  3. Create a secondary zone using IONOS Cloud DNS API.

  4. Establish and verify the zone transfer between primary and secondary zones.

Procedure

1

Set up a Dedicated Core Server in IONOS Cloud

Note:

  • The user who creates the server has full root or administrator access rights. A server, once provisioned, retains all its settings (resources, drive allocation, password, and so on), even after server restart at the operating system level.

  • The server will only be removed from your virtual data center once you delete it in the DCD.

2

To set up a Dedicated Core server in IONOS Cloud, follow these steps:

3

1. Create a Dedicated Core server

4

Create a Dedicated Core server and configure the server in the Settings tab by following the steps in Create a Dedicated Core Serverarrow-up-right.

5

Create a Server

6

2. Dedicated Core Server network settings

7

In the DCDarrow-up-right > Inspector pane on the right, configure the following network details in the Network tab.

8

1. Name: Choose a name unique to this Virtual Data Center (VDC)arrow-up-right.

9

2. MAC: Assigned on VM creation.

10

3. LAN: Select the LAN connection that is connected to the internet, by default LAN 1.

11

4. Firewall: By default, the firewall is disabled. To enable firewall rules, make sure that incoming and outgoing traffic is allowed on port 53 for UDP and TCP.

12

5. IPv4 Configuration: Leave to default values.

13

VM Network settings

14
circle-check
15

3. Dedicated Core Server storage settings

16
circle-exclamation
17

In the DCDarrow-up-right > Inspector pane on the right, configure the following storage details in the Storage tab.

18

1. Click SSD and a new pop-up window Create New Attached Storage appears.

19

2. Configure the following storage details:

20
  • Name: Enter a name that is unique within your VDC.

  • Availability Zone: Leave on "Auto".

  • Size in GB: Enter "30" which is sufficient for this tutorial.

  • Performance: Select "Standard".

21

VM Storage settings

22
  • Image: You can select one of IONOS Cloud images or snapshots, or use your own. For this tutorial, select ubuntu-24.04-server-cloudimg-amd64 under IONOS Cloud Images.

  • Password: Create a password for the "root" user of the server. You will need this password to SSH and make changes.

  • SSH Keys: Select an SSH key stored in the SSH Key Manager.

  • Ad-hoc SSH Key: If you have not created an SSH key, copy and paste the public part of your SSH key into this field.

  • Cloud-Init user data: Leave on "No configuration".

  • Boot from Device: Select this checkbox to make the SSD drive bootable.

23

VM Storage settings

24

3. Click Create SSD Storage to create the SSD storage.

25
circle-check
26

4. Provision changes and start the Dedicated Core Server

27

1. Select the newly created Dedicated Core server.

28

2. From the Settings tab in the Inspector pane, select Power > Start.

29

3. Click Provision Changes in the lower right corner and then click Provision Now.

30
circle-check
31

Next steps: After your changes are provisioned and the server is started, select your Dedicated Core server, click the Network tab in the Inspector pane and copy the IPv4 address.

32

VM Network settings IP

33
circle-check

Configure a Dedicated Core Server as a primary nameserver

circle-info

Prerequisite: A Dedicated Core server in IONOS Cloud needs to be set up and you must have the IPv4 address of the server.

To configure a Dedicated Core server and enable it to act as the primary nameserver, follow these steps:

1. SSH into the newly created Dedicated Core server.

2. Connect to the newly created server via SSH.

3. Proceed with configuring bind9 and your primary zone.

4. Configure notify to the IONOS Cloud DNS anycast nameserver and allow zone update from localhost.

circle-info

Note: For sending DNS notify messages, IONOS Cloud DNS uses the following Anycast addresses: IPv4 212.227.123.25 or IPv6 2001:8d8:fe:53::5cd:25.

5. Create your primary zone.

6. Edit the zone file.

7. Save your changes and quit the Vim editor.

8. Check the configuration, reload bind, and verify that the configured primary zone is working.

circle-check

Create a secondary zone in IONOS Cloud DNS

circle-info

Prerequisite: A Dedicated Core server in IONOS Cloud is set up as a primary nameserver.

To create a secondary zone in the IONOS Cloud DNS by using the REST API, follow this step:

  • Send a POST request to the /secondaryzones endpoint.

circle-check

Verify zone transfer

On the primary nameserver, you can verify the zone transfer in the logs by executing the following command:

You can also verify zone transfer status using IONOS Cloud DNS API:

Add a record

To add a record, follow these steps:

1. On the primary nameserver, update the zone with a new record setting—A record to a TEST-NET-3 IP address:

2. Resolve the new record locally.

3. View the logs which show that a notification is sent to the secondary zone for the new record.

4. Using Cloud DNS API, verify that the newly added record is transferred to the secondary zone.

5. Globally resolve a new record from the IONOS Cloud DNS anycast network by using the following command:

Final result

By following this tutorial, you have successfully set up a secondary DNS zone in IONOS Cloud using a BIND9 server on Ubuntu. You can now manage DNS records on your primary nameserver and ensure reliable zone transfers to the secondary zone.

Conclusion

In this tutorial, you learned how to set up a secondary DNS zone in IONOS Cloud with BIND9 on Ubuntu. By following the steps, you can efficiently manage DNS records and automate zone transfers between primary and secondary servers.

Last updated

Was this helpful?