Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] [BOOKWORM] How to completely disable IPv6?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

[Solved] [BOOKWORM] How to completely disable IPv6?

#1 Post by Danielsan »

Hello there,

is there a way to completely disable IPv6?

So far the only working method I found is adding ipv6.disable=1 to GRUB; however this workaround doesn't block it completely, it only prevents to be used. The point is I don't run an ISP, I don't need IPv6, I don't want to see IPv6 utterly complicated stuff when I use Debian. It should be asked during the installation (and after a dist-upgrade) if you want enable IPv6, otherwise Debian is becoming and acting like Canonical does with Ubuntu.
Last edited by Danielsan on 2023-10-25 04:15, edited 1 time in total.

User avatar
kc1di
Posts: 282
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 11 times

Re: [BOOKWORM] How to completely disable IPv6?

#2 Post by kc1di »

you can disable it in network manager by going to configure network connections click on your link and got to Ipv6 and there is a drop down box at the bottom of that list is disable. do it for both ethernet and wifi if you have them.
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

peter_irich
Posts: 1406
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: [BOOKWORM] How to completely disable IPv6?

#3 Post by peter_irich »

You can also place record

Code: Select all

net.ipv6.conf.default.disable_ipv6=1
in /etc/sysctl.confand enter command as root

Code: Select all

sysctl -p
See /proc/sys/net.

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: [BOOKWORM] How to completely disable IPv6?

#4 Post by Aki »

Hello,
Danielsan wrote: 2023-10-17 13:30 [..] adding ipv6.disable=1 to GRUB [..] however this workaround doesn't block it completely, it only prevents to be used. [..]
So what do you want to achieve that disabling IPv6 from grub will not allow ?

The ipv6 kernel module is compiled as a built-in part of the Debian kernel and this cannot be modified at install time (even if the debian developers wanted to):

Code: Select all

# grep CONFIG_IPV6= /boot/config-$(uname -r) 
CONFIG_IPV6=y
If you wish, you can rebuild your own custom kernel disabling the compilation of IPV6 module. Are you willing to do this for the sake of block it completely ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: [BOOKWORM] How to completely disable IPv6?

#5 Post by Danielsan »

peter_irich wrote: 2023-10-17 18:21 You can also place record

Code: Select all

net.ipv6.conf.default.disable_ipv6=1
in /etc/sysctl.confand enter command as root

Code: Select all

sysctl -p
See /proc/sys/net.
This method did not work.
Aki wrote: 2023-10-17 19:56 So what do you want to achieve that disabling IPv6 from grub will not allow ?

The ipv6 kernel module is compiled as a built-in part of the Debian kernel and this cannot be modified at install time (even if the debian developers wanted to):
Ah this make sense. The point is when you disable it by grub it says that is active but disabled. My personal point since I don't use and I need it too. But I didn't know that it was hard coded in the kernel.

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: [BOOKWORM] How to completely disable IPv6?

#6 Post by Aki »

Hello,
Danielsan wrote: 2023-10-17 23:04 [..] The point is when you disable it by grub it says that is active but disabled.
This is the message in the kernel ring buffer (dmesg) when the ipv6.disable=1 kernel option is active:

Code: Select all

[    6.295172] IPv6: Loaded, but administratively disabled, reboot required to enable
Danielsan wrote: 2023-10-17 23:04 My personal point since I don't use and I need it too. But I didn't know that it was hard coded in the kernel.
Well, as I wrote above, you can recompile the kernel to disable it completely. The message will no longer appear.

Please, mark the discussion as "solved" manually adding the text tag "[Solved]" at the beginning of the subject of the first message (after other tags, if any); for example:
[BOOKWORM] [Solved] How to completely disable IPv6?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply