Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > linux.debian.maint.ipv6 > #121

Disabling IPv6 by default when creating a new namespace in Linux

From Dheeraj Kandula <dkandula@gmail.com>
Newsgroups linux.debian.maint.ipv6
Subject Disabling IPv6 by default when creating a new namespace in Linux
Date 2022-06-07 18:30 +0200
Message-ID <EvKfD-3eJb-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi All,
          I have been able to disable IPv6 globally by adding the following
sysctls to the /etc/sysctl.conf file.

net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1

When I boot up the machine (it is a VM actually), IPv6 is disabled. But
when I create  a new namespace, IPv6 is enabled by default. I added the
following line to /etc/sysctl.conf file, but still IPv6 is enabled.

net.core.devconf_inherit_init_net=1

I tried with setting the value to 2 and 3 too. The default is 0. But IPv6
was still enabled inside a newly created namespace.

How do I disable IPv6 by default when a new namespace is created?

*My requirement is to have IPv6 disabled globally and in newly created
namespaces*. If the user wants to enable IPv6 in a specific namespace,
he/she can do so with the following command


*sudo nsenter --net=/var/run/netns/<namespace name> sysctl -w
net.ipv6.all.conf.disable_ipv6=0*

Dheeraj

Back to linux.debian.maint.ipv6 | Previous | NextNext in thread | Find similar


Thread

Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 18:30 +0200
  Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 19:10 +0200
    Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 19:30 +0200
      Re: Disabling IPv6 by default when creating a new namespace in Linux marcoshalano@gmail.com - 2022-06-07 20:40 +0200
        Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 21:40 +0200
          Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 21:50 +0200
      Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 20:40 +0200
        Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-07 21:00 +0200
          Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 21:30 +0200
            Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 22:30 +0200
              Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-08 17:20 +0200
                Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-09 09:10 +0200
            Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-07 22:30 +0200
      Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-07 20:40 +0200
    Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-07 19:30 +0200
  Re: Disabling IPv6 by default when creating a new namespace in Linux Marc Haber <mh+debian-ipv6@zugschlus.de> - 2022-06-07 19:20 +0200
    Re: Disabling IPv6 by default when creating a new namespace in Linux Dheeraj Kandula <dkandula@gmail.com> - 2022-06-07 19:30 +0200
    Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-07 19:40 +0200
  Re: Disabling IPv6 by default when creating a new namespace in Linux Bjørn Mork <bjorn@mork.no> - 2022-06-07 19:30 +0200

csiph-web