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

Dheeraj Kandula <[email protected]> Tue, 7 Jun 2022 13:24:51 -0400
Newsgroups gmane.linux.debian.devel.ipv6
Message-ID <CA+qNgxT1DAkjNYCwrDCmL800PAbzvup+3bPz+1RgOjASVkDjxg@mail.gmail.com>
--0000000000006bd18b05e0dede1e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On my system I see the following values:

$cat /sys/module/ipv6/parameters/disable_ipv6
0

$ sudo sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 =3D 1

$ sudo sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 =3D 1

Are you suggesting that "cat /sys/module/ipv6/parameters/disable_ipv6"
should be 1?

Dheeraj


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

> Dheeraj Kandula <[email protected]> writes:
>
> >          Thanks for your reply. Are you suggesting that if I boot up th=
e
> > machine with "net.ipv6.conf.all.disable_ipv6=3D1" and
> > "net.ipv6.conf.default.disable_ipv6=3D1", IPv6 should be disabled in ne=
wly
> > created namespaces too.
>
> No.  But if you boot with "ipv6.disable_ipv6=3D1" then you should see
>
>  grep . /sys/module/ipv6/parameters/disable_ipv6
>
> returning 1.  This will be used as the default value of
> "net.ipv6.conf.default.disable_ipv6" for all namespaces.  Including the
> default namespace.
>
> That's a lot of nested defaults ;-) Hope you get the meaning.
>
>
> Bj=C3=B8rn
>

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

<div dir=3D"ltr"><div>On my system I see the following values:</div><div><b=
r></div><div>$cat /sys/module/ipv6/parameters/disable_ipv6</div><div>0</div=
><div><br></div><div>$ sudo sysctl net.ipv6.conf.all.disable_ipv6<br>net.ip=
v6.conf.all.disable_ipv6 =3D 1</div><div><br></div><div>$ sudo sysctl net.i=
pv6.conf.default.disable_ipv6<br>net.ipv6.conf.default.disable_ipv6 =3D 1</=
div><div><br></div><div>Are you suggesting that &quot;cat /sys/module/ipv6/=
parameters/disable_ipv6&quot; should be 1?<br></div><div><br></div><div>Dhe=
eraj</div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"l=
tr" class=3D"gmail_attr">On Tue, Jun 7, 2022 at 1:11 PM Bj=C3=B8rn Mork &lt=
;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t:1px solid rgb(204,204,204);padding-left:1ex">Dheeraj Kandula &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;=
 writes:<br>
<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Thanks for your reply. Are you sugge=
sting that if I boot up the<br>
&gt; machine with &quot;net.ipv6.conf.all.disable_ipv6=3D1&quot; and<br>
&gt; &quot;net.ipv6.conf.default.disable_ipv6=3D1&quot;, IPv6 should be dis=
abled in newly<br>
&gt; created namespaces too.<br>
<br>
No.=C2=A0 But if you boot with &quot;ipv6.disable_ipv6=3D1&quot; then you s=
hould see<br>
<br>
=C2=A0grep . /sys/module/ipv6/parameters/disable_ipv6<br>
<br>
returning 1.=C2=A0 This will be used as the default value of<br>
&quot;net.ipv6.conf.default.disable_ipv6&quot; for all namespaces.=C2=A0 In=
cluding the<br>
default namespace.<br>
<br>
That&#39;s a lot of nested defaults ;-) Hope you get the meaning.<br>
<br>
<br>
Bj=C3=B8rn<br>
</blockquote></div>

--0000000000006bd18b05e0dede1e--