Disabling IPv6 support in Red Hat Enterprise Linux 7

Disable ipv6 built-in kernel module.
  1. Edit /etc/default/grub and append ipv6.disable=1 to GRUB_CMDLINE_LINUX like the following sample:
    GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/swap 
      crashkernel=auto rd.lvm.lv=rhel/root ipv6.disable=1"
    
  2. 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
    
  3. Reboot the system to disable IPv6 support.