|
1 | 1 | --- |
2 | 2 | meta: |
3 | 3 | title: Implementing a DNS server using BIND |
4 | | - description: In this tutorial you will learn How to implement a DNS server using BIND. |
| 4 | + description: Learn how to install and configure a BIND DNS server on a Scaleway Instance to manage domain name resolution. |
5 | 5 | content: |
6 | 6 | h1: Implementing a DNS server using BIND |
7 | | - paragraph: In this tutorial you will learn How to implement a DNS server using BIND. |
| 7 | + paragraph: Learn how to install and configure a BIND DNS server on a Scaleway Instance to manage domain name resolution. |
8 | 8 | tags: dns bind |
9 | 9 | categories: |
10 | 10 | - domains-and-dns |
11 | 11 | dates: |
12 | | - validation: 2024-11-18 |
| 12 | + validation: 2025-05-27 |
13 | 13 | posted: 2018-12-05 |
14 | 14 | --- |
15 | 15 |
|
16 | 16 | DNS (Domain Name System) is a service that translates the IP address of computers connected to the internet into human-readable domain names, and vice versa. In an environment with a limited amount of Linux machines, it is possible to use the `/etc/hosts` file for associating an IP address to a DNS name. But when you have a large infrastructure with lots of systems/resources, `/etc/hosts` may quickly become cumbersome. |
17 | 17 |
|
18 | | -[BIND](https://www.isc.org/bind/) or Berkeley Internet Name Domain is open-source software that implements DNS protocols for the internet. In this tutorial, we need a DNS server machine & a client machine for testing. |
| 18 | +[BIND](https://www.isc.org/bind/) or Berkeley Internet Name Domain is open-source software that implements DNS protocols for the internet. In this tutorial, we need primary and secondary DNS server machines, in accordance with best practice to ensure redundancy. We also need a third machine (e.g. your local machine) for testing. |
19 | 19 |
|
20 | 20 | <Macro id="requirements" /> |
21 | 21 |
|
22 | 22 | - A Scaleway account logged into the [console](https://console.scaleway.com) |
23 | 23 | - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 24 | +- Two [Instances](/instances/how-to/create-an-instance/) running Ubuntu, to act as the primary and secondary DNS server machines. |
| 25 | +- A local machine, or a third Instance, to test from. |
24 | 26 | - An [SSH key](/organizations-and-projects/how-to/create-ssh-key/) |
25 | 27 | - `sudo` privileges or access to the root user |
26 | 28 |
|
27 | 29 | ## Installing BIND |
28 | 30 |
|
29 | | -1. Install the latest version of BIND 9.20 and related tools: |
| 31 | +1. Connect to the Instance that will act as the primary DNS server using [SSH](/instances/how-to/connect-to-instance/): |
| 32 | + ``` |
| 33 | + ssh root@<your_instance_ip> |
| 34 | + ``` |
| 35 | + |
| 36 | +2. Update the `apt` package manager and upgrade the software already installed on the Instance to the latest version, available in Ubuntu's repositories: |
| 37 | + ``` |
| 38 | + apt update && apt upgrade -y |
| 39 | +
|
| 40 | +3. Install the latest version of BIND 9.18 and related tools: |
30 | 41 | ``` |
31 | 42 | apt-get install bind9 bind9utils bind9-doc dnsutils |
32 | 43 | ``` |
33 | | -2. Verify the installed version: |
| 44 | +4. Verify the installed version: |
34 | 45 | ``` |
35 | 46 | named -v |
36 | 47 | ``` |
37 | 48 | The expected output should be: |
38 | 49 | ``` |
39 | | - BIN 9.20.x |
| 50 | + BIND 9.18.x |
40 | 51 | ``` |
41 | | - |
| 52 | +5. Repeat the above steps on the secondary DNS server Instance. |
42 | 53 |
|
43 | 54 | ## Configuring the primary DNS server |
44 | 55 |
|
@@ -138,6 +149,8 @@ DNS (Domain Name System) is a service that translates the IP address of computer |
138 | 149 |
|
139 | 150 | ### Testing the Configuration |
140 | 151 |
|
| 152 | +Carry out the following steps on a third machine, e.g. your local machine or another Instance. |
| 153 | +
|
141 | 154 | 1. Check the primary DNS server: |
142 | 155 | ```bash |
143 | 156 | dig @192.0.2.1 www.example.com |
@@ -169,6 +182,6 @@ DNS (Domain Name System) is a service that translates the IP address of computer |
169 | 182 |
|
170 | 183 | ## Conclusion |
171 | 184 |
|
172 | | -You have successfully configured a DNS server using BIND 9.20. You can now resolve domain names within your infrastructure or serve DNS queries to external clients. |
| 185 | +You have successfully configured a redundant DNS server using BIND 9.18. You can now resolve domain names within your infrastructure or serve DNS queries to external clients. |
173 | 186 |
|
174 | | -For more advanced configurations and features, refer to the [official BIND 9.20 documentation](https://kb.isc.org/docs/isc-bind-9). |
| 187 | +For more advanced configurations and features, refer to the [official BIND documentation](https://kb.isc.org/docs/isc-bind-9). |
0 commit comments