Re: Disabling IPv6 by default when creating a new namespace in Linux
Dheeraj Kandula <[email protected]> Tue, 7 Jun 2022 15:26:48 -0400
| Newsgroups | gmane.linux.debian.devel.ipv6 |
|---|---|
| Message-ID | <CA+qNgxQOoKg=J0ZcDmjnTKdvCt-9_nPFyierGF5PWvVNVDtsVA@mail.gmail.com> |
--0000000000008eaf6e05e0e09271 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Bj=C3=B8rn for the reply. But with the grub command line, IPv6 optio= n is not available i.e.* net.ipv6.conf.all.disable_ipv6* i.e. net.ipv6 itself is not available. $ sudo sysctl net.ipv6 sysctl: cannot stat /proc/sys/net/ipv6: No such file or directory I want to enable and disable IPv6 when the Linux box is up and running. Sysctls worked but not for new namespaces. Is this a limitation of Linux? BTW, the value is still 0 for disable_ipv6 $ cat /sys/module/ipv6/parameters/disable_ipv6 0 Dheeraj On Tue, Jun 7, 2022 at 2:38 PM Bj=C3=B8rn Mork <[email protected]> wrote: > Dheeraj Kandula <[email protected]> writes: > > > Thanks Bj=C3=B8rn for your response. I think I am getting a bit confuse= d here. > > > > I booted up my Linux VM and set the following in my /etc/sysctl.conf > file: > > > You need to make the change in your boot loader. grub or whatever. > That's where the kernel command line is set. > > E.g edit /etc/default/grub and add ipv6.disable_ipv6=3D1 to the > GRUB_CMDLINE_LINUX variable, and then run update-grub to produce a new > /boot/grub/grub.cfg configuration file. > > > > > Bj=C3=B8rn > --0000000000008eaf6e05e0e09271 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Thanks Bj=C3=B8rn for the reply. But with the grub co= mmand line, IPv6 option is not available i.e.<b> net.ipv6.conf.all.disable_= ipv6</b> i.e. net.ipv6 itself is not available. <br></div><div><br></div><d= iv>$ sudo sysctl net.ipv6<br>sysctl: cannot stat /proc/sys/net/ipv6: No suc= h file or directory<br></div><div><br></div><div>I want to enable and disab= le IPv6 when the Linux box is up and running. <br></div><div><br></div><div= >Sysctls worked but not for new namespaces. Is this a limitation of Linux?<= /div><div><br></div><div>BTW, the value is still 0 for disable_ipv6<br></di= v><div><br></div><div>$ cat /sys/module/ipv6/parameters/disable_ipv6<br>0<b= r></div><div><br></div><div>Dheeraj<br></div></div><br><div class=3D"gmail_= quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jun 7, 2022 at 2:38 PM= Bj=C3=B8rn Mork <<a href=3D"mailto:[email protected]">[email protected]</a>>= wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dheeraj = Kandula <<a href=3D"mailto:[email protected]" target=3D"_blank">dkandul= [email protected]</a>> writes:<br> <br> > Thanks Bj=C3=B8rn for your response. I think I am getting a bit confus= ed here.<br> ><br> > I booted up my Linux VM and set the following in my /etc/sysctl.conf f= ile:<br> <br> <br> You need to make the change in your boot loader.=C2=A0 grub or whatever.<br= > That's where the kernel command line is set.<br> <br> E.g edit /etc/default/grub and add ipv6.disable_ipv6=3D1 to the<br> GRUB_CMDLINE_LINUX variable, and then run update-grub to produce a new<br> /boot/grub/grub.cfg configuration file.<br> <br> <br> <br> <br> Bj=C3=B8rn<br> </blockquote></div> --0000000000008eaf6e05e0e09271--