Disable IPv6 in Debian 11 (Bullseye)

This how to helps you to learn How To Disable IPv6 in Debian 11 (Bullseye). We’ll provide an overview of IPv6, its purpose, and why you might want to disable it. We’ll also discuss the relevance of this topic in the context of Debian Bookworm.

Disable IPv6 in Debian 11 (Bullseye)

Disable IPv6 in Debian 11 (Bullseye)

Index Of How To Disable IPv6 in Debian 11 (Bullseye)

Background

What is IPv6

IPv6 (Internet Protocol version 6) is the successor to IPv4. It was designed to address the limitations of IPv4, such as the exhaustion of available addresses. IPv6 uses 128-bit addresses, allowing for a significantly larger pool of unique addresses.

Why Disable IPv6

While IPv6 adoption is increasing, some users may still prefer to disable it for various reasons:

  • Compatibility issues with certain applications or services
  • Security concerns
  • Network performance considerations
  • Personal preference

Common Scenarios for Disabling IPv6

  • Application Compatibility: Some older applications or network devices may not fully support IPv6. Disabling it ensures compatibility with legacy systems.
  • Security Concerns: Although IPv6 includes security features, some users prefer to disable it due to potential vulnerabilities or attack vectors.
  • Network Performance: In specific cases, disabling IPv6 can improve network performance by reducing unnecessary traffic.
  • Preference: Some users simply prefer to work exclusively with IPv4.

How To Disable IPv6 in Debian 11 (Bullseye)

Now let’s get practical! In this chapter, we’ll guide you through the steps to permanently disable IPv6 on your Debian Bookworm system. In this How To we leverage on double disabling it, once leveraging on the sysctl configuration and once leveraging on blacklisting IPv6 modules. I typically do both, but up to you to decide to do it only with one of the two methods.

Methode 1: Using sysctl Configuration

In the terminal open the sysctl.conf. I usually leverage on vi, but you also can leverage on nano or any other.

sudo vi /etc/sysctl.conf

Add the below lines to disable IPv6 and save the file.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Apply the changes made now by executing:

sudo sysctl -p

 

Metod 2: Blacklisting IPv6 Modules

First we create a new file to blacklist IPv6

sudo vi /etc/modprobe.d/disable-ipv6.conf

Within this file we add the following line, save the file and exit:

blacklist ipv6

Now we  apply the change.

Additional Information

In this final chapter, we’ll cover additional details related to IPv6 and its impact on your system.

Verifying IPv6 Status And If Disabled

To verify that IPv6 is disabled, use the following command:

ip a | grep inet6

If no IPv6 addresses are listed, than you were successful in disabling it.

Reverting The Made Changes

Whenever you need, you simply undo the steps made via the above method 1 and method 2. 

Other Information

Follow me

It would be amazing if you follow my myhowto.blog. To my blog is actually easy! You can leverage on

  • Click to follow me on X
  • Bookmark this page and comeback from time to time

Help and Comments

I am really looking forward for you to contact me if for example you found a better option or other idea then in this how to. Also, please touch base if you found an error or anything not working or if you have something that you would love to be added to the myhowto.blog. Simply click this link to touch base with me.

Linking Or Recommending The How To Or The MyHowTo.blog

I would love to see you are recommending this how to or link it to your website. Also, I would love if you link or recommend the whole myhowto.blog. Please feel free to do so! In case you like to touch base regarding this topic with me, then simply click this link. I look forward!