+5 votes
75 views
Restart, Stop or Start Linux DNS Service

in Linux/Unix by (552k points)
reopened | 75 views

1 Answer

+3 votes
Best answer

How to restart, stop or start DNS on Linux

The DNS (Domain Name System - Domain Name System) allows network peripherals to translate IP addresses to domain names and vice versa, thanks to this is that when accessing a browser we enter the name of the site but not its IP, the DNS is essential in all current operating systems due to its functionality, there are some tasks that we can perform on DNS which in Linux acts as a service.
To clarify that Linux handles two types of DNS which are Bind 9 (for Debian, Ubuntu) and Named (Fedora, RHEL, CentOS), and we will talk a bit about both types of DNS..

 

Bind9 is an open source DNS system which has a MPL 2.0 license allowing developers to add new functions, Bind 9 is able to act as an authoritative name server, a DNS forwarder or add DNS zones, automatic signature of DNSSEC zones and key management, some of its features are:

 

DNSSEC Features

 

  • RRL (Response Rate Limiting) function which has been added as an enhancement to named in order to deal with amplification attacks using DNS Response Rate Limiting
  • Integrates DLZ (Dynamically-Loadable Zones) which allow BIND 9 to retrieve data directly from an external database
  • Minimum responses at query level
  • DNSSEC-compliant
  • HSM support
  • Minimum reload time thanks to remote name daemon (rndc)
  • Adds catalog of Zones with various servers to use
  • Integrates DNSTAP with which it is possible to capture and record DNS traffic

 

 

 

On the other hand, Named is the Internet domain name server integrated into RHEL-based distros and is part of the BIND 9 distribution. There may come a time when it is necessary to perform certain tasks on the DNS, whether it is slow, restarting, with connection failures, etc., TechnoWikis will explain these basic tasks of actions on the DNS and in this case we will use Ubuntu 22.04.

 

 

To stay up to date, remember to subscribe to our YouTube channel!
SUBSCRIBE ON YOUTUBE

 

 

How to restart, stop or start DNS on Linux

 

Step 1

We open the terminal (and in the case of Debian and Ubuntu) to start the DNS we execute:
 service bind9 start 
Step 2

When executing this command we must enter the password:

 

 

image

 

Step 3

We will see that the command has been executed correctly:

 

image

 

Step 4

To stop the DNS we execute:
 service bind9 stop 
step 5

We must still enter the password:

 

 

image

 

step 6

We will see that the DNS has stopped:

 

image

 

step 7

To restart the DNS we execute:
 service bind9 restart 
step 8

After entering the password we will see that it has been done correctly:

 

 

image

 

This command is useful when the DNS presents failures and with a simple reboot it will be possible to solve multiple failures..

 

step 9

To reload the DNS we execute the following:
 service bind9 reload 
step 10

As in the previous cases, we must enter the password:

 

 

image

 

step 11

We will see that the DNS has been reloaded:

 

image

 

step 12

Reload allows the changes that have been made to the DNS to be applied correctly.
To see the DNS status we execute:
 service bind9 status 
image

 

 

step 13

Another option to do this with Bind 9 is by running:
 /etc/init.d/bind9 start /etc/init.d/bind9 stop /etc/init.d/bind9 restart /etc/init.d/bind9 status 
step 14

In the case of CentOS or Fedora we can do the following:
 service named start service named stop service named restart 

image

 

step 15

Either we see the state:
 service named status 

image

 

step 16

Furthermore it is possible to run:
 /etc/init.d/named start /etc/init.d/named stop /etc/init.d/named restart 
This is how we have worked on the DNS in Linux for its optimal functioning.

 


by (3.5m points)
edited

Related questions

+5 votes
1 answer
+3 votes
1 answer
asked Nov 14, 2019 in Windows 10 by backtothefuture (552k points) | 288 views
+5 votes
1 answer
+5 votes
1 answer
asked Nov 8, 2019 in Windows 10 by backtothefuture (552k points) | 1.1k views
+5 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users