Information
Internet Protocol Version 6 (IPv6) is the most recent version of Internet Protocol (IP). It's designed to supply IP addressing and additional security to support the predicted growth of connected devices.
It is recommended that either IPv6 settings are configured OR IPv6 be disabled to reduce the attack surface of the system.
NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.
Solution
If IPv6 is to be disabled, use one of the two following methods to disable IPv6 on the system:
To disable IPv6 through the GRUB2 config, run the following command to add ipv6.disable=1 to the GRUB_CMDLINE_LINUX parameters:
grubby --update-kernel ALL --args 'ipv6.disable=1'
OR To disable IPv6 through sysctl settings, set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:
Example:
# printf "
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
" >> /etc/sysctl.d/60-disable_ipv6.conf
Run the following command to set the active kernel parameters:
# {
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.route.flush=1
}
Impact:
IETF RFC 4038 recommends that applications are built with an assumption of dual stack.
If IPv6 is disabled through sysctl config, SSH X11forwarding may no longer function as expected. We recommend that SSH X11fowarding be disabled, but if required, the following will allow for SSH X11forwarding with IPv6 disabled through sysctl config:
Add the following line the /etc/ssh/sshd_config file:
AddressFamily inet
Run the following command to re-start the openSSH server:
# systemctl restart sshd