how to disable ipv6 networking on debian / ubuntu

5
(1)

On modern systems IPV6 protocol enabled by default. And in some situations, it sometimes gets in the way. Therefore, we will tell you how to disable this feature in Debian / Ubuntu systems.

Check that an IPv6 interface is available on the host:

$ ip addr | grep inet6

Output like this:

 ip addr | grep inet6
    inet6 ::1/128 scope host
    inet6 fe80::20c:29ff:fe58:3263/64 scope link

Edit the sysctl.conf file to disable IPv6 support for all interfaces at once:





$ sudo nano /etc/sysctl.conf

Add the following line to the end of confuguration file

# disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

To apply the change in sysctl.conf, you need to run the command:





sudo sysctl –p

On Debian 10/11

$ sudo /sbin/sysctl -p

This will disable IPv6 on system.

Similar Posts:

429

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top