NSD (Name Server Daemon) is an open-source, fast, and lightweight DNS server that provides DNSSEC support. In this tutorial, we will guide you on how to install NSD on MXLinux Latest.
Before starting the installation process, make sure that your system is up to date and you have sudo privileges.
To install NSD on MXLinux Latest, open the terminal and execute the following command:
sudo apt-get install nsd
This command will install NSD along with its dependencies.
Once the installation process completes, we need to configure NSD to start serving DNS requests.
Open the NSD configuration file in your preferred text editor. In this example, we will use nano.
sudo nano /etc/nsd/nsd.conf
Configure NSD to listen on your server's IP address by modifying the following line:
server:
ip-address: <your_server_IP_address>
port: 53
Next, we need to define the DNS zones that the server will serve. For example, to serve a domain example.com, add the following zone configuration:
zone:
name: "example.com"
zonefile: "/etc/nsd/zones/example.com.zone"
Create a zone file for the domain and add the necessary DNS records:
sudo nano /etc/nsd/zones/example.com.zone
$TTL 3600
@ IN SOA ns1.example.com. admin.example.com. (
2019031400 ; serial, todays date+todays
3600 ; refresh, seconds
1800 ; retry, seconds
604800 ; expire, seconds
3600 ; minimum, seconds
)
IN NS ns1.example.com.
ns1 IN A <your_server_IP_address>
www IN A <your_server_IP_address>
Save and close the file.
Restart the NSD service to apply the changes:
sudo systemctl restart nsd
Check the status of the NSD service:
sudo systemctl status nsd
If everything is configured correctly, you will see a status message indicating that NSD is running.
In this tutorial, we installed and configured NSD on MXLinux Latest. You can now use NSD as your DNS server and take advantage of its high performance and DNSSEC support.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!