[Solved] How to disable ipv6 via grub kernel parameter?

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dayan
Level 1
Level 1
Posts: 6
Joined: Tue Oct 25, 2022 10:07 pm

[Solved] How to disable ipv6 via grub kernel parameter?

Post by dayan »

Hello,
I am trying to disable ipv6 from loading at boot. Normally I would do this by modifying /etc/default/grub , but I learned that parameters are appended in LMDE by creating a config file in /etc/default/grub.d/90_override.cfg and it would look like this:

Code: Select all

#! /bin/sh
set -e
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
However, that doesn't seem to be working. I have plymouth.enable=0 appended to disable plymouth at boot and that does work, but ipv6.disable=1 isn't working. I can check if the ipv6 kernel module is loaded by running:

Code: Select all

sudo sysctl -a | grep -i ipv6
I should get an empty output which would indicate that ipv6 is disabled, but the output isn't empty.
I like to disable ipv6 to prevent DNS leaks.

My 90_override.cfg file currently looks like this:

Code: Select all

#! /bin/sh
set -e
GRUB_CMDLINE_LINUX_DEFAULT="plymouth.enable=0,ipv6.disable=1"
Thanks.
Last edited by LockBot on Wed May 03, 2023 10:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Nuts2u
Level 3
Level 3
Posts: 129
Joined: Sun Nov 27, 2011 8:44 pm

Re: How to disable ipv6 via grub kernel parameter?

Post by Nuts2u »

You have a typr in you frub cmd line it is a , not a .
Here is the line from my config and ipv6 is disabled:
ipv6,disable=1
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.
Nuts2u
Level 3
Level 3
Posts: 129
Joined: Sun Nov 27, 2011 8:44 pm

Re: How to disable ipv6 via grub kernel parameter?

Post by Nuts2u »

speaking of typo's it is grub not frub, typo not typr sorry about that
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.
dayan
Level 1
Level 1
Posts: 6
Joined: Tue Oct 25, 2022 10:07 pm

Re: How to disable ipv6 via grub kernel parameter?

Post by dayan »

Nuts2u wrote: Fri Nov 04, 2022 4:06 pm You have a typr in you frub cmd line it is a , not a .
Here is the line from my config and ipv6 is disabled:
ipv6,disable=1
Hello,
Sorry, you're mistaken. From what I can see ipv6.disable=1 with a period is correct. However, I believe there should be no comma between plymouth.enable=0 and ipv6.disable=1. Instead it should look like this,

Code: Select all

"plymouth.enable=0 ipv6.disable=1"
This has worked. Odd thing though, I had to reboot twice before it worked.

Thanks!
Last edited by dayan on Sat Nov 05, 2022 9:49 pm, edited 1 time in total.
Nuts2u
Level 3
Level 3
Posts: 129
Joined: Sun Nov 27, 2011 8:44 pm

Re: How to disable ipv6 via grub kernel parameter?

Post by Nuts2u »

What ever makes your boat float. If you check around online tutorials about your issue, you will see it is a comma not a period.
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.
dayan
Level 1
Level 1
Posts: 6
Joined: Tue Oct 25, 2022 10:07 pm

Re: How to disable ipv6 via grub kernel parameter?

Post by dayan »

Nuts2u wrote: Sat Nov 05, 2022 8:59 am What ever makes your boat float. If you check around online tutorials about your issue, you will see it is a comma not a period.
I see periods in the tutorials I have saved. *Shrug*
Locked

Return to “Networking”