[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



Hi All,
       If this is not supported in Linux, can I go ahead and file a bug/enhancement request against the Linux kernel?

Dheeraj

On Tue, Jun 7, 2022 at 3:31 PM Dheeraj Kandula <dkandula@gmail.com> wrote:
Thanks Marc for your email. With the grub option, the IPv6 feature itself may have been removed from the running Linux kernel. But, I want IPv6 functionality to be present in the kernel but with the capability to enable or disable it.

If disabled, IPv6 should be disabled on current namespaces and future namespaces, until I enable IPv6 again.

Is this possible in Linux?

Dheeraj

On Tue, Jun 7, 2022 at 2:38 PM <marcoshalano@gmail.com> wrote:
Dheeraj,

You don't need to touch the /etc/sysctl.conf. You need to touch your bootloader configuration file. You can see an example of how to do it here: https://www.thegeekdiary.com/centos-rhel-7-how-to-disable-ipv6/

On 07/06/2022 15:33, Dheeraj Kandula <dkandula@gmail.com> wrote:
> Thanks Bjørn for your response. I think I am getting a bit confused here.
>
> I booted up my Linux VM and set the following in my /etc/sysctl.conf file:
>
> net.ipv6.conf.all.disable_ipv6=1
> net.ipv6.conf.default.disable_ipv6=1
>
> 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ørn Mork <bjorn@mork.no
> <mailto:bjorn@mork.no>> wrote:
>
>     Dheeraj Kandula <dkandula@gmail.com <mailto:dkandula@gmail.com>> 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=1" on the command line,
>     then it will be.
>
>
>     Bjørn
>
>


Reply to: