How To Disable IPv6 on Fedora 39
In this tutorial, we will show you how to disable IPv6 on Fedora 39. IPv6, or Internet Protocol version 6, is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. However, there are instances where you might want to disable IPv6, such as for network troubleshooting, software compatibility, or reducing network complexity.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step disable IPv6 on a Fedora 39.
Prerequisites
- A server running one of the following operating systems: Fedora 39.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- You will need access to the terminal to execute commands. Fedora 39 provides the Terminal application for this purpose. It can be found in your Applications menu.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Disable IPv6 on Fedora 39
Disabling IPv6 Temporarily
Using the Command Line
The command line, a powerful tool in Linux, allows you to disable IPv6 temporarily. This method is particularly useful when you need to troubleshoot network issues or test software compatibility.
- Open the Terminal application. You can do this by searching for “Terminal” in your applications or by using the keyboard shortcut
Ctrl + Alt + T
. - Enter the following command to disable IPv6 temporarily:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
This command writes ‘1’ to the disable_ipv6
file, effectively disabling IPv6 on all network interfaces.
Using Network Manager
Network Manager, Fedora’s default network management tool, also allows for temporary disabling of IPv6.
- Open Network Manager. You can find it in your system settings under “Network”.
- Select the network connection you want to modify, then click on the “Settings” button.
- In the settings window, navigate to the “IPv6” tab.
- Change the “Method” to “Ignore”, then click “Apply”.
This will disable IPv6 for the selected network connection.
Disabling IPv6 Permanently
Using the Command Line
To permanently disable IPv6 using the command line, you’ll need to modify the system’s kernel parameters.
- Open the Terminal application.
- Open the
sysctl
configuration file in a text editor with root privileges. You can use thenano
text editor for this:
sudo nano /etc/sysctl.conf
- Add the following lines to the end of the file:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
- Save and close the file. If you’re using
nano
, you can do this by pressingCtrl + X
, thenY
to confirm saving changes, and finallyEnter
to confirm the file name. - Apply the changes with the following command:
sudo sysctl -p
This will disable IPv6 on all network interfaces permanently.
Using Network Manager
To permanently disable IPv6 using Network Manager:
- Follow the steps outlined in the temporary disabling section, but this time, make sure to disable IPv6 for all network connections you use.
- Restart your computer for the changes to take effect.
Verifying IPv6 is Disabled
After disabling IPv6, it’s important to verify that the changes have been applied correctly.
- Open the Terminal application.
- Enter the following command:
ip a | grep inet6
If IPv6 is disabled, this command should return no output.
Congratulations! You have successfully disabled IPv6. Thanks for using this tutorial to disable the IPv6 Fedora 39 system. For additional help or useful information, we recommend you check the official Fedora website.