🪟 Windows TippsModify Windows Support Phone Number with PowerShell(03.09.2026 um 00:00 Uhr)
🔧 AI Nachrichten Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf(28.08.2026 um 08:46 Uhr)
🪟 Windows TippsMicrosoft bringt Emoji 17.0 auf Windows 11(31.08.2026 um 08:16 Uhr)
🪟 Windows TippsModify Windows Support Phone Number with PowerShell(03.09.2026 um 00:00 Uhr)
🔧 AI Nachrichten Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf(28.08.2026 um 08:46 Uhr)
🪟 Windows TippsMicrosoft bringt Emoji 17.0 auf Windows 11(31.08.2026 um 08:16 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 10 Min Lesezeit
0

How to Install and Configure a Private BIND DNS Server on Ubuntu 22.04

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

DNS (Domain Name System) plays a crucial role in mapping human-readable domain names into machine-friendly IP addresses, acting as a "phonebook" in the middle. Whether you're managing a private network or hosting web services, a reliable DNS solution ensures smooth communication and connectivity. The BIND (Berkeley Internet Name Domain) DNS server, one of the most widely used and trusted DNS software, offers a reliable infrastructure for creating and managing domain name resolution services. Its flexibility, scalability, and support for advanced configurations make it the go-to choice for administrators around the globe.



, which provides high-compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. It also offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider you choose and follow the same steps for the rest of the tutorial.






Step 1: Setting up a NodeShift Account



Visit straight to your dashboard.





3) Click on Start to start creating your very first compute node.





2) Next, select a geographical region from the Region dropdown where you want to launch your VM (e.g., United States).








Step 4: Choose VM Configuration and Image



1) After selecting your required configuration options, you'll see the available VMs in your region and as per (or very close to) your configuration. In our case, we'll choose a '4 vCPUs/4GB/80GB SSD' Compute node.



2) Next, you'll need to choose an image for your Virtual Machine. For the scope of this tutorial, we'll select Ubuntu, as we will deploy the DNS server on Ubuntu 22.04.





2) Next, you'll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.





That's it! You are now ready to deploy the node. Finalize the configuration summary; if it looks good, go ahead and click Create to deploy the node.








Step 8: Install BIND 9



1) Before moving to the installation of BIND 9, let's first update the package source list and upgrade the softwares




CODE
apt update -y && apt upgrade -y






Output:





3) Check if the BIND 9 service is running




CODE
systemctl status bind9









Step 9: Configure BIND DNS Server



We'll configure the BIND 9 DNS server with its two configuration files: named.conf.options, which is its main configuration file, and named.conf.local, which is used to define local DNS zones for a private domain.



1) Configure named.conf.options



a) Open the file with the Nano editor




CODE
sudo nano /etc/bind/named.conf.options






The file that opens up looks like this:





b) Edit the content of the file



(replace <YOUR_REVERSE_IP_NAME> with your reverse zone IP name)




CODE
zone "nodeshift.local" IN { //define forward zone
type master;
file "/etc/bind/zones/forward.nodeshift";
};
zone "<YOUR_REVERSE_IP_NAME>.in-addr.arpa" IN { // define reverse zone
type master;
file "/etc/bind/zones/reverse.nodeshift.rev";
};






c) Check the syntax




CODE
named-checkconf /etc/bind/named.conf.local






If it executes successfully without any errors/outputs, the syntax is correct.






Step 10: Configure the Zone files



Now, let's configure the zone files we defined in the previous step.



First, create a directory for zone files to save our files.




CODE
mkdir /etc/bind/zones






1) Create forward zone file



First, we'll create a forward zone file /etc/bind/zones/forward.nodeshift , which will be responsible for helping the BIND DNS server to resolve names (e.g., bindserver.nodeshift.local) to IP addresses (e.g., 192.168.2.2).



a) Copy the default db.local zone file to /etc/bind/zones/forward.nodeshift




CODE
cp /etc/bind/db.local /etc/bind/zones/forward.nodeshift






b) Open forward.nodeshift file in Nano editor




CODE
sudo nano /etc/bind/zones/forward.nodeshift






c) Make the necessary edits




CODE
$TTL    604800
; SOA record for forward.nodeshift zone
@ IN SOA nodeshift.local. root.nodeshift.local. (
1 ; Serial (increment after each change)
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; NS record pointing to the authoritative nameserver
@ IN NS bindserver.nodeshift.local.
; A record for name server
bindserver IN A 192.168.2.2
; A record for clients
client1 IN A 192.168.2.3
client2 IN A 192.168.2.4






the edited file looks something like this:





2) Configure the reverse zone file



Next, we'll create and configure the reverse zone file /etc/bind/zones/reverse.nodeshift.rev. It is responsible for helping the DNS server to resolve IP addresses -> Names (for e.g., 192.168.2.2 -> bindserver.nodeshift.local)



a) Copy the default db.local file to /etc/bind/zones/reverse.nodeshift.rev



cp /etc/bind/db.local /etc/bind/zones/reverse.nodeshift.rev



b) Edit the content of the file, according to the below instructions



(replace <YOUR_SERVER_IP> with your server's IP address)




CODE
$TTL    604800
; SOA record for reverse.nodeshift zone
@ IN SOA nodeshift.local. root.nodeshift.local. (
1 ; Serial (increment after each change)
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; NS record for reverse zone
@ IN NS bindserver.nodeshift.local.
; A record for name server
bindserver IN A <YOUR_SERVER_IP>
; PTR record for name server
2 IN PTR bindserver.nodeshift.local
; PTR record for clients
3 IN PTR client1.nodeshift.local
4 IN PTR client2.nodeshift.local






the file should look similar to this:





3) Restart BIND 9 server



Once you're done with the above zone files configurations, restart the server for changes to take effect.




CODE
systemctl restart bind9









Step 11: Configure Clients for using BIND DNS



Now, when our private BIND DNS is configured, let's configure clients to use the server.



1) Check the interface



(replace <YOUR_SERVER_IP> with your server's IP address)




CODE
ip -brief addr show to <YOUR_SERVER_IP>/24






Output:





b) Open the file (shown in the above output)



Come back to the root directory and open the YAML file using Nano




CODE
sudo nano /etc/netplan/50-cloud-init.yaml






c) Make the necessary edits as per the below template




CODE
network:
version: 2
ethernets:
enp0s5:
addresses:
- 192.168.2.3/24 # IP of client1
- 192.168.2.4/24 # IP of client2
match:
macaddress: ca:06:71:90:38:f9
mtu: 1500
nameservers:
addresses:
- 192.168.2.2 # Private DNS server IP
search: [ nodeshift.local ] # Domain name of your private DNS
set-name: enp0s5






this is how the edited file looks:



3) Test the configuration



Once the configuration is done, test it with the command below:




CODE
netplan try






It will ask you to accept the changes, press ENTER, and it's done!








CODE
nslookup client2






Output:








Conclusion



Setting up a private BIND DNS server is essential in managing domain name resolution for your internal network. In this tutorial, we’ve walked you through configuring BIND 9, forward and reverse zones, ensuring your private DNS is set up properly. By deploying this setup on NodeShift's cloud platform, we took advantage of a high-performance virtual machine, which simplified our deployment process and also provided a reliable foundation for deploying critical services like DNS servers.



For more information about NodeShift:







Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Modify Windows Support Phone Number with PowerShell
1 Quelle
Die Zukunft des Einkaufens: Warum wir ein neues Kapitel aufschlagen (und wie du es mitschreiben kannst)
1 Quelle
ZDE Podcast 251: Wie sieht digitales Instore Marketing 2026 aus, Amit Chatterjee?
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Install and Configure a Private BIND DNS Server on Ubuntu 22.04

Thematisch verwandte Begriffe: Install, Configure, Private, BIND · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...