Home / Linux / How to Disable IPv6 in CentOS 8
How to Disable IPv6 in CentOS 8

How to Disable IPv6 in CentOS 8

How to Disable IPv6 in CentOS 8

An web protocol model 6 (IPv6) is an identifier of a community interface that’s concerned in an IPv6 pc community. If you don’t need to use Ipv6 addressing, you’ll choose to disable it both briefly or completely.

In this text, you’re going to be told a couple of techniques to disable IPv6 in your CentOS 8 Linux device.

Disabling IPv6 in CentOS 8

First, test whether or not IPv6 is enabled in your CentOS 8 device the use of the next ip command.

# ip a | grep inet6
Check IPv6 Status in CentOS 8

Check IPv6 Status in CentOS 8

If IPv6 enabled, you’ll see some inet6 traces, then again, if the command doesn’t print anything else, IPv6 is disabled on your entire community interfaces.

Disable IPv6 Using sysctl Command

This way is for brief disabling IPv6. You don’t require to reboot your gadget for the adjustments to happen. However, it’s somewhat difficult than the everlasting way you are going to be told in a while.

First create a brand new sysctl configuration report /and so on/sysctl.d/70-ipv6.conf the use of the next command.

# vi /and so on/sysctl.d/70-ipv6.conf

Next, upload the next traces and save the report.

internet.ipv6.conf.all.disable_ipv6 = 1
internet.ipv6.conf.default.disable_ipv6 = 1
Sysctl Configuration File

Sysctl Configuration File

Now, to disable IPv6 use the next command.

# sysctl --load /and so on/sysctl.d/70-ipv6.conf
Temporarily Disable IPv6 in CentOS 8

Temporarily Disable IPv6 in CentOS 8

IPv6 will have to now be disabled.

To check if IPv6 is disabled, run the next ip command.

# ip a | grep inet6
Check IPv6 Disabled in CentOS 8

Check IPv6 Disabled in CentOS 8

If the command doesn’t go back anything else implying that IPv6 has been disabled on your entire community interfaces.

When the use of this system, a few of your community interfaces might nonetheless use IPv6 whenever you reboot your gadget. This occurs as a result of CentOS 8 makes use of Network Manager by way of default.

To utterly forestall the use of IPv6, use the next nmcli command.

# nmcli connection adjust interface ipv6.way forget about

Finally, reboot your CentOS 8 device.

# reboot

Disable IPv6 Using The Kernel Boot Option

The kernel boot possibility calls for a gadget reboot after the configuration. It’s the most productive way of disabling IPv6.

To use this system, open the default GRUB configuration report /and so on/default/grub with the vi textual content editor, as proven beneath.

# vi /and so on/default/grub

Next, head to the tip of the report and press O to create a brand new line and sort the next.

GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX ipv6.disable=1"

Next, save and go out the configuration report.

The subsequent step is to replace the GRUB CFG recordsdata. Type the next command to find the grub recordsdata.

#  ls -lh /and so on/grub*.cfg

You will see 2 GRUB CFG report paths: /boot/grub2/grub.cfg and /boot/efi/EFI/centos/grub.cfg.

Type the next command to create a brand new GRUB configuration report and put it aside to /boot/grub2/grub.cfg.

# grub2-mkconfig -o /boot/grub2/grub.cfg

Next, sort the next command to create a brand new GRUB configuration report and put it aside to /boot/efi/EFI/centos/grub.cfg.

# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Finally, reboot your CentOS 8 device.

# reboot

After rebooting, sort the next command to check whether or not IPv6 is disabled.

# ip a | grep inet6

If the command does now not print anything else, it method IPv6 is disabled.

Summary

In this text, you will have discovered about two techniques you’ll disable IPv6 in your CentOS 8 Linux device. The first way is by way of the use of sysctl whilst the second one is by way of the use of the Kernel boot possibility. While Disabling IPv6 Using sysctl is brief, the Kernel boot possibility is everlasting and is the most productive way.

Check Also

How to Watch TCP and UDP Ports in Real-time

How to Watch TCP and UDP Ports in Real-time

How to Watch TCP and UDP Ports in Real-time In tool phrases, particularly on the …

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories

Recent Posts

Categories