Information
The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.
Note: bind9 is the package and bind.service is the alias for named.service
Unless a system is specifically designated to act as a DNS server, it is recommended that the package be deleted to reduce the potential attack surface.
Solution
Run the following commands to stop named.service and remove the bind9 package:
# systemctl stop named.service
# apt purge bind9
- OR -
- IF - the bind9 package is required as a dependency:
Run the following commands to stop and mask bind9.service :
# systemctl stop named.service
# systemctl mask named.service
Impact:
There may be packages that are dependent on the bind9 package. If the bind9 package is removed, these dependent packages will be removed as well. Before removing the bind9 package, review any dependent packages to determine if they are required on the system.
- IF - a dependent package is required: stop and mask named.service leaving the bind9 package installed.