In this article, we will show you how to disable IPv6 for good on Fedora Linux 39 using a kernel boot option.
Topic of Contents:
- Checking If IPv6 Is Enabled
- Disable the IPv6 System-Wide Using the Kernel Boot Parameter
- Checking If IPv6 Is Disabled Completely
- Re-Enabling IPv6
- Conclusion
Checking If IPv6 Is Enabled
IPv6 is enabled by default on most modern Linux distributions including Fedora.
To check whether you have IPv6 enabled, you can use the “nmcli” command. If IPv6 is enabled, you will see a random IPv6 address assigned to each of the network interfaces of your computer.
Another way to check if IPv6 is enabled is by checking whether you have the IPv6 kernel parameters set on your computer with the following command:
As you can see, our Fedora 39 system has the IPv6 kernel parameters set. So, IPv6 is enabled in our case.
Disable the IPv6 System-Wide Using the Kernel Boot Parameter
To disable IPv6 completely on Fedora 39 using the “ipv6.disable=1” kernel boot parameter, run the following command:
The “ipv6.disable=1” kernel boot parameter should be set for all the GRUB boot entries of Fedora 39 as you can see in the following screenshot:
For the changes to take effect, you must restart your Fedora 39 system.
Checking If IPv6 Is Disabled Completely
Once IPv6 is disabled completely on your Fedora 39 system, you will see that only the IPv4 addresses are set on each of the network interfaces of your computer, no IPv6 addresses as before.
If IPv6 is disabled from the kernel, you won’t see any IPv6 kernel parameters set on your Fedora 39 system.
The command returns nothing since IPv6 is completely disabled on our Fedora 39 system.
Re-Enabling IPv6
If you later change your mind and you want to enable IPv6 again, just run the following command:
The “ipv6.disable=1” kernel boot parameter should be removed from all the GRUB boot entries.
For the changes to take effect, reboot your Fedora 39 system.
Once your computer boots, you can confirm whether IPv6 is enabled as before using the “nmcli” or “sysctl” command.
Conclusion
In this article, we showed you how to check whether IPv6 is enabled or disabled on your computer. We also showed you how to disable IPv6 completely on Fedora 39 using the “ipv6.disable=1” kernel boot parameter and how to re-enable IPv6 on Fedora 39 in case you need it again.