How do I disable the IPv6 protocol on Red Hat Satellite and/or Red Hat Capsule server?

Solution Verified - Updated

Environment

  • Red Hat Satellite / Capsule 6.x
  • Red Hat Enterprise Linux 7, 8, 9

Issue

  • How do I disable the IPv6 protocol on Red Hat Satellite and/or Red Hat Capsule server?

Resolution

Note: It is not recommended to disable IPv6 on the Satellite/Capsule server by adding ipv6.disable=1 kernel parameter, so follow below steps on the Satellite / Capsule server:

  1. Create a new file named /etc/sysctl.d/ipv6.conf, and add the following options:

    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 0
    

    Important Note: For the internal working of Red Hat Satellite services, it is required to have IPv6 address on the loopback interface.

  2. Verify that /etc/default/grub does not have ipv6.disable=1 in the GRUB_CMDLINE_LINUX= line:

.
.
GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_system/swap crashkernel=auto  vconsole.font=latarcyrheb-sun16 rd.lvm.lv=vg_system/lv_root vconsole.keymap=uk rhgb quiet ipv6.disable=1"
.
.

If that's the case, remove ipv6.disable=1 from the referred to line in /etc/default/grub, then rebuild the grub:

For RHEL 9 and later:

grub2-mkconfig --update-bls-cmdline -o /boot/grub2/grub.cfg

For RHEL8 and earlier:

# grub2-mkconfig -o /boot/grub2/grub.cfg
  1. Reboot the server.

  2. Rebuild the Initial RAM Disk Image using:

    # dracut -f
    
  3. Verify the file inclusion:

    # lsinitrd /boot/initramfs-<kernel-version>.img  | grep '/etc/sysctl.d/ipv6.conf'
    
  4. If ipv6 was present within /boot/grub2/grubenv, then remove the entry by following this process:

       # Remove ipv6 setting in the GRUB_CMDLINE_LINUX 
       vi /etc/default/grub
    
       # Rebuild the grub
       grub2-mkconfig -o /boot/grub2/grub.cfg # BIOS systems
       grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg # EFI systems
    
       # Check grubenv is up to date and does not contain ipv6 setting.
       cat /boot/grub2/grubenv
    
  5. Check and ensure that the kernel option ipv6.disable=1 entry from the grubby file by referring to article.

  6. Restart the server:

    # reboot
    

Diagnostic Steps

  • Verify if ipv6 is disabled within the grubenv:

     # grep "ipv6.disable" /boot/grub2/grubenv
    
SBR
Product(s)
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.