Thanks Bjørn for the reply. But with the grub command line, IPv6 option 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ørn Mork <[email protected]> wrote: > Dheeraj Kandula <[email protected]> writes: > > > 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: > > > 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=1 to the > GRUB_CMDLINE_LINUX variable, and then run update-grub to produce a new > /boot/grub/grub.cfg configuration file. > > > > > Bjørn >

