2.2.5 Ensure dnsmasq services are not in use

Information

dnsmasq is a lightweight tool that provides DNS caching, DNS forwarding and DHCP (Dynamic Host Configuration Protocol) services.

Unless a system is specifically designated to act as a DNS caching, DNS forwarding and/or DHCP server, it is recommended that the package be removed to reduce the potential attack surface.

Solution

Run the following commands to stop dnsmasq.service and remove dnsmasq package:

# systemctl stop dnsmasq.service
# yum remove dnsmasq

-OR-

-IF- the dnsmasq package is required as a dependency:

Run the following commands to stop and mask the dnsmasq.service :

# systemctl stop dnsmasq.service
# systemctl mask dnsmasq.service

Impact:

There may be packages that are dependent on the dnsmasq package. If the dnsmasq package is removed, these dependent packages will be removed as well. Before removing the dnsmasq package, review any dependent packages to determine if they are required on the system.

-IF- a dependent package is required: stop and mask the dnsmasq.service leaving the dnsmasq package installed.

See Also

https://workbench.cisecurity.org/benchmarks/15963

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|9.2

Plugin: Unix

Control ID: 3c112f883bebd455a1283ec4ca1257a5c57fde5ff29638c327a61d838fae7e57