#916457 grub2-common: Grub refuses to re-enable IPv6 traffic

Package:
grub2-common
Source:
grub2
Description:
GRand Unified Bootloader (common files for version 2)
Submitter:
Alan Reding
Date:
2018-12-16 15:54:04 UTC
Severity:
normal
#916457#5
Date:
2018-12-14 17:23:35 UTC
From:
To:
Hi

To block IPv6 traffic, I do the following:

1. Add the following line to /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet"

2. Run update-grub

3. In /etc/hosts, add # in front of all lines that mention IPv6 hosts

3. Reboot machine

To re-enable IPv6 traffic, I do the following:

Method A

4. Add # in front of the line that contains
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet" as in below:

#GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet"

5. Run update-grub

6. In /etc/hosts, remove # from all lines that mention IPv6 hosts

7. Reboot machine

Result: IPv6 traffic is still blocked

Method B

8. In /etc/default/grub, I delete the line
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet"

9. Run update-grub

10. In /etc/hosts, I ensure that # does not appear in front of lines that
mention IPv6 hosts

11. Reboot machine

Result: IPv6 traffic is still blocked

Method C

12. In /etc/default/grub, I change the value of ipv6.disable=0 as in:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=0 quiet"

13. Run update-grub

14. In /etc/hosts, I ensure that # does not appear in front of lines that
mention IPv6 hosts

15. Reboot machine

Result: IPv6 traffic is NOT blocked. IPv6 traffic is re-enabled

NOTE: The above bug is present in both of my hard disk drives. One has Debian
9.6 installed inside an LVM volume. The other hard disk drive has Debian 9.6
installed in a non-encrypted volume (ie. normal, standard volume)

#916457#10
Date:
2018-12-14 22:56:30 UTC
From:
To:
[...]

GRUB just passes the stuff in GRUB_CMDLINE_LINUX_DEFAULT straight
through to the kernel; it has no other involvement in how the operating
system's networking stack is set up.  This could only possibly be a GRUB
bug if you're finding that update-grub isn't correctly transferring
GRUB_CMDLINE_LINUX_DEFAULT into /boot/grub/grub.cfg, or if the kernel
parameters are somehow not actually being passed to the kernel (which
you can check after boot by looking in /proc/cmdline).  Otherwise, this
cannot possibly be a GRUB bug, and I'd appreciate it if you could either
close it or figure out some other suitable package to reassign it to, as
appropriate.

These symptoms indicate to me that the equivalent of ipv6.disable=1 is
being set somewhere else *as well*, which causes things to only work
properly if you explicitly pass the kernel argument ipv6.disable=0.  I'd
suggest looking around in /etc/, perhaps /etc/modprobe.d/.

#916457#15
Date:
2018-12-16 14:34:57 UTC
From:
To:
Hello Colin

Thanks for your response.

Following your reply, I did a test which consisted of the following steps:

1. I ran sudo gedit /etc/default/grub, deleted/removed GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet", ran sudo update-grub and rebooted my machine.

2. Immediately after the reboot, I issued the command nano /proc/cmdline and below is the result:

BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.bpo.1-amd64 root=UUID=[string of alphanumeric characters] ro ipv6.disable=1 quiet

3. Next, I ran the command sudo grep -RF ipv6.disable /etc and below is the result:

/etc/default/grub.ucf-old:#GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet"
/etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet"

I am puzzled why ipv6.disable=1 quiet appears in the above results of (2) and (3) despite the fact that I had deleted/removed GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet" from /etc/default/grub.

Regards.

Alan Reding
-------------------------------------------- On Fri, 12/14/18, Colin Watson <cjwatson@debian.org> wrote: Subject: Re: Bug#916457: grub2-common: Grub refuses to re-enable IPv6 traffic To: "Alan Reding" <gajUph4pre@yahoo.com>, 916457@bugs.debian.org Date: Friday, December 14, 2018, 10:56 PM On Fri, Dec 14, 2018 at 05:23:35PM +0000, Alan Reding wrote: > To block IPv6 traffic, I do the following: > > 1. Add the following line to /etc/default/grub > > GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet" > > 2. Run update-grub > > 3. In /etc/hosts, add # in front of all lines that mention IPv6 hosts > > 3. Reboot machine > > To re-enable IPv6 traffic, I do the following: [...] GRUB just passes the stuff in GRUB_CMDLINE_LINUX_DEFAULT straight through to the kernel; it has no other involvement in how the operating system's networking stack is set up.  This could only possibly be a GRUB bug if you're finding that update-grub isn't correctly transferring GRUB_CMDLINE_LINUX_DEFAULT into /boot/grub/grub.cfg, or if the kernel parameters are somehow not actually being passed to the kernel (which you can check after boot by looking in /proc/cmdline).  Otherwise, this cannot possibly be a GRUB bug, and I'd appreciate it if you could either close it or figure out some other suitable package to reassign it to, as appropriate. > Method A > > 4. Add # in front of the line that contains > GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet" as in below: > > #GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet" > > 5. Run update-grub > > 6. In /etc/hosts, remove # from all lines that mention IPv6 hosts > > 7. Reboot machine > > Result: IPv6 traffic is still blocked > > Method B > > 8. In /etc/default/grub, I delete the line > GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet" > > 9. Run update-grub > > 10. In /etc/hosts, I ensure that # does not appear in front of lines that > mention IPv6 hosts > > 11. Reboot machine > > Result: IPv6 traffic is still blocked > > Method C > > 12. In /etc/default/grub, I change the value of ipv6.disable=0 as in: > > GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=0 quiet" > > 13. Run update-grub > > 14. In /etc/hosts, I ensure that # does not appear in front of lines that > mention IPv6 hosts > > 15. Reboot machine > > Result: IPv6 traffic is NOT blocked. IPv6 traffic is re-enabled These symptoms indicate to me that the equivalent of ipv6.disable=1 is being set somewhere else *as well*, which causes things to only work properly if you explicitly pass the kernel argument ipv6.disable=0.  I'd suggest looking around in /etc/, perhaps /etc/modprobe.d/.
#916457#20
Date:
2018-12-16 15:50:43 UTC
From:
To:
I'll need to see the full contents of /etc/default/grub and
/boot/grub/grub.cfg immediately after running step 1 above.  (No need to
reboot.)