How to Enable or Disable IPV6 on Ubuntu Linux

IPv6, also known as Internet Protocol version 6, offers a larger address space as compared to IPv4. With its advanced features, IPv6 is designed to enhance system security and improve network performance.

Moreover, IPv6 offers enhanced support for mobile networks. Enabling or disabling IPv6 on Ubuntu can depend on user needs and requirements.

In this post, we’ll explore how to enable or disable the IPv6 address on Linux Ubuntu 22.04 system.

How to Enable or Disable IPV6 on Ubuntu Linux?

Please adhere to these guidelines to enable or disable the IPv6 address on Ubuntu Linux system.

Step 1: Check Current IPv6 Configuration

To enable or disable IPv6, first, check the current status of IPv6 from your terminal:

ip -6 addr show
ip -6 addr show

If you see “inet6” after executing the command, it indicates that the IPv6 is enabled on your Ubuntu system.

Now, let’s start to disable the IPv6 on Ubuntu system.

Upgrade your website to our state-of-the-art VPS NVMe hosting for unparalleled speed and performance. Benefit from limitless bandwidth, maximum adaptability, and top-notch performance—all at an unbeatable price.

Step 2: Open the GRUB Configuration File

Run the provided command to access the GRUB configuration file:

sudo nano /etc/default/grub
sudo nano /etc/default/grub

Step 3: Disable IPv6

Within the GRUB configuration file, locate the line containing “GRUB_CMDLINE_LINUX_DEFAULT” and add “ipv6.disable=1” using the following syntax:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"

Enable IPv6 

To enable IPv6 on Ubuntu, set “GRUB_CMDLINE_LINUX_DEFAULT” to “ipv6.disable=0” in the GRUB configuration file:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=0"

Step 4: Update GRUB 

Run the update-grub command to save and update the changes in the GRUB Configuration file: 

sudo update-grub
sudo update-grub

After successfully updating the GRUB file, you will see “done” in your output. 

Step 5: Reboot

Without rebooting your Ubuntu machine, the changes made in the GRUB file may not apply. Run the reboot command to apply the changes by restarting your system: 

reboot 
reboot 

Step 6: Verify IPv6 Status

Once your Ubuntu system reboots, verify that IPv6 has been disabled on Ubuntu Linux:

ip -6 addr show
ip -6 addr show

An empty output after running the command indicates that IPv6 has been disabled on your system.

Conclusion

In Linux-based distributions, including Ubuntu 22.03, you can enable or disable IPv6 using simple steps. First, access the GRUB configuration file through sudo nano /etc/default/grub and edit the line GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1″ to disable IPv6. 

To enable IPv6, change it to GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=0″

We hope you like this guide. To delineate the process of preventing unwanted IP addresses from accessing your website using .htaccess, rely on the security and management provided by CyberPanel VPS hosting on Ultahost. This ensures regular updates to your blocked IP list, enhancing overall effectiveness.

FAQ

Can I Enable or Disable IPv6 on my Ubuntu 22.04?
How can I check if IPv6 is enabled or disabled on my Ubuntu system?
From where I can enable or disable IPv6 on my Linux-based Ubuntu?

Related Post

How to Install OpenCV on Ubuntu

OpenCV, short for Open Source Computer Vision Library, ...

How to Install Logwatch on Ubuntu

As a Ubuntu user, managing system logs can be a dauntin...

How to Install Deb Files / Packages on Ubuntu

The .deb packages are the standard format for installin...

How to Install Terraform on Ubuntu 22.04

Terraform, developed by HashiCorp, is an open-source in...

How to Install Postman on Ubuntu 22.04

If you’re a software developer, you know the importan...

How to Restart Ubuntu From Terminal

Restarting Ubuntu after updates, troubleshooting, or ro...

Leave a Comment