Re: Disabling IPv6 by default when creating a new namespace in Linux

Dheeraj Kandula <[email protected]> Tue, 7 Jun 2022 14:33:08 -0400
Newsgroups gmane.linux.debian.devel.ipv6
Message-ID <CA+qNgxSYSbJ6TzgfxzUv99VTVPxEAYqzCWWxgX-yXqUAOJgV8w@mail.gmail.com>
--000000000000aabed005e0dfd262
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thanks Bj=C3=B8rn for your response. I think I am getting a bit confused he=
re.

I booted up my Linux VM and set the following in my /etc/sysctl.conf file:

net.ipv6.conf.all.disable_ipv6=3D1
net.ipv6.conf.default.disable_ipv6=3D1

I saved the file.

*I rebooted my VM.*

After reboot, I check the value of
"/sys/module/ipv6/parameters/disable_ipv6". *It is still 0.*

As it is still 0, the new namespaces are created with IPv6 enabled. Is this
a bug in the kernel code?

Dheeraj

On Tue, Jun 7, 2022 at 2:17 PM Bj=C3=B8rn Mork <[email protected]> wrote:

> Dheeraj Kandula <[email protected]> writes:
>
> > On my system I see the following values:
> >
> > $cat /sys/module/ipv6/parameters/disable_ipv6
> > 0
>
> Yes, that's the default unless you change it..
>
> > Are you suggesting that "cat /sys/module/ipv6/parameters/disable_ipv6"
> > should be 1?
>
> Yes, And if you boot with "ipv6.disable_ipv6=3D1" on the command line,
> then it will be.
>
>
> Bj=C3=B8rn
>

--000000000000aabed005e0dfd262
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Thanks Bj=C3=B8rn for your response. I think I am get=
ting a bit confused here.</div><div><br></div><div>I booted up my Linux VM =
and set the following in my /etc/sysctl.conf file:</div><div><br></div><div=
>net.ipv6.conf.all.disable_ipv6=3D1<br>net.ipv6.conf.default.disable_ipv6=
=3D1</div><div><br></div><div>I saved the file.</div><div><br></div><div><b=
>I rebooted my VM.</b></div><div><br></div><div>After reboot, I check the v=
alue of &quot;/sys/module/ipv6/parameters/disable_ipv6&quot;. <b>It is stil=
l 0.</b> <br></div><div><br></div><div>As it is still 0, the new namespaces=
 are created with IPv6 enabled. Is this a bug in the kernel code?</div><div=
></div><div><br></div><div>Dheeraj<br></div></div><br><div class=3D"gmail_q=
uote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jun 7, 2022 at 2:17 PM =
Bj=C3=B8rn Mork &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; =
wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dheeraj K=
andula &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">dkandula=
@gmail.com</a>&gt; writes:<br>
<br>
&gt; On my system I see the following values:<br>
&gt;<br>
&gt; $cat /sys/module/ipv6/parameters/disable_ipv6<br>
&gt; 0<br>
<br>
Yes, that&#39;s the default unless you change it..<br>
<br>
&gt; Are you suggesting that &quot;cat /sys/module/ipv6/parameters/disable_=
ipv6&quot;<br>
&gt; should be 1?<br>
<br>
Yes, And if you boot with &quot;ipv6.disable_ipv6=3D1&quot; on the command =
line,<br>
then it will be.<br>
<br>
<br>
Bj=C3=B8rn<br>
</blockquote></div>

--000000000000aabed005e0dfd262--