Skip to content
View in the app

A better way to browse. Learn more.

hosang I.T.

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to disable IPv6 on Linux

Featured Replies

  • 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_ipv6

If the command returns no output, IPv6 is successfully disabled

Disable 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"
done

Edit the GRUB configuration

sudo vi /etc/default/grub

Add 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.cfg

For UEFI-based systems:

sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

To 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 partitions

Reboot the system:

sudo reboot

SUMMARY

Selectively 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.

  • Views 54
  • Created
  • Last Reply

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.