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.

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"

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 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 Check and Manage Logs on Docker Compo

Managing logs in Docker Compose is essential for develo...

How to Install Docker on Ubuntu 22.04

Docker on Ubuntu is an open-source platform facilitatin...

How to Install Drupal on Ubuntu

Drupal is a free and open-source content management fra...

How to Install and Configure Squid Proxy on U

A proxy server acts as an intermediary between a client...

How to Install Python on Ubuntu

Python is a powerful and versatile programming language...

How to Install Sublime Text on Ubuntu

Sublime Text is a popular, feature-rich text editor des...

Leave a Comment