March 4Mar 4 Administrators We have an agent we are using on our RHEL build and the agent can communicate via IPv4 or IPv6 but we do not have IPv6 established in our network so I want to disable IPv6 since the agent keeps defaulting to IPv6 and failing.So what do you do?Verify IPv6# Show IPv6 addresses on all interfaces ip a | grep inet6 # Check that no IPv6 addresses remain on the interface ip -6 addr show dev ens224 # The output should be empty (no IPv6 addresses listed) # Confirm the setting stuck nmcli connection show "ens224" | grep ipv6.method # Should show: ipv6.method: disabled # Show IPv6 method for all connections (interfaces) nmcli -f NAME,IPV6.METHOD connection show # Or check sysctl for all interfaces sysctl -a 2>/dev/null | grep disable_ipv6If the command returns no output, IPv6 is successfully disabledDisable IPv6 on a Specific Interface# Disable IPv6 on the ens224 interface sudo nmcli connection modify "ens224" ipv6.method disabled # Apply the change sudo nmcli connection up "ens224"Disable IPv6 on Multiple Interfaces# Disable IPv6 on a list of connections for conn in "ens224" "ens256" "virbr0"; do sudo nmcli connection modify "$conn" ipv6.method disabled sudo nmcli connection up "$conn" echo "IPv6 disabled on $conn" doneEdit the GRUB configurationsudo vi /etc/default/grubAdd ipv6.disable=1 to the GRUB_CMDLINE_LINUX line inside the quotes.GRUB_CMDLINE_LINUX="... ipv6.disable=1"Regenerate the GRUB configuration:For BIOS-based systems:sudo grub2-mkconfig -o /boot/grub2/grub.cfgFor UEFI-based systems:sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfgTo identify if RHEL is running in UEFI or Legacy (BIOS) mode, check for the presence of the /sys/firmware/efi directory. If the directory exists, the system is booted in UEFI mode. If it does not exist, it is using Legacy BIOS.Check for UEFI Directory: Run ls /sys/firmware/efi. If it lists files (like config_table or vars), it is UEFI.Check via Command Line (Alternative): Run [ -d /sys/firmware/efi ] && echo "UEFI" || echo "Legacy".Check via dmesg: Run dmesg | grep -i "EFI" to look for EFI-related boot messages.Check via dmidecode: Run sudo dmidecode -t bios and look for "UEFI is supported" or BIOS characteristics.UEFI: Uses /sys/firmware/efi and typically GPT partitions.Legacy: Lacks the EFI directory and typically uses MBR partitionsReboot the system:sudo rebootSUMMARYSelectively disabling IPv6 per interface is the right way to handle IPv4-only network segments on RHEL. Use nmcli connection modify with ipv6.method disabled and you get clean, persistent, per-interface control. Stay away from kernel-level global disabling unless you have a very specific reason and fully understand the consequences.