How to Disable IPV6 on RHEL 8 / Rocky Linux 8 / Alma Linux 8
Method 1: Using GRUB2 Edit /etc/default/grub and append ipv6.disable=1 to GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/swap crashkernel=auto rd.lvm.lv=rhel/root ipv6.disable=1" Run the grub2-mkconfig command to regenerate the grub.cfg file: grub2-mkconfig -o /boot/grub2/grub.cfg Alternatively, on UEFI systems, run the following: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg Reboot Server reboot Method 2: Using sysctl Create File ipv6.conf nano /etc/sysctl.d/ipv6.conf ============================== # First, disable for all interfaces net.ipv6.conf.all.disable_ipv6 = 1 # If using the sysctl method, the protocol must be disabled all specific interfaces as well. net.ipv6.conf..disable_ipv6 = 1 ============================== Reloaded sysctl -p /etc/sysctl.d/ipv6.conf Create a backup of the initramfs before making any changes to it: cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m-%d-%H%M%S).img rebuild the Initial RAM Disk Image dracut -f...