CentOS 8.x Disabling IPv6
From Notes_Wiki
<yambe:breadcrumb self="Disabling IPv6">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>
CentOS 8.x Disabling IPv6
Disable IPv6 using sysctl
- First check whether IPv6 is enabled or not using:
- ip addr | grep inet6
- Create /etc/sysctl.d/70-ipv6.conf with following contents:
- net.ipv6.conf.all.disable_ipv6 = 1
- net.ipv6.conf.default.disable_ipv6 = 1
- Now to disable IPv6 use:
- sysctl --load /etc/sysctl.d/70-ipv6.conf
Note that due to use of network manager IPv6 might get enabled on reboot. For that we can try to disable IPv6 for interface using nmcli using:
nmcli connection nmcli connection modify <connection> ipv6.method ignore
after replacing <connection> with appropriate connection name
Refer:
Disable IPv6 using kernel boot options
To disable IPv6 using kernel options use:
- Edit /etc/default/grub and append option:
- ipv6.disable=1
- in GRUB_CMDLINE_LINUX using:
- GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX ipv6.disable=1"
- Create updated grub configuration using:
- grub2-mkconfig -o /boot/grub2/grub.cfg
- Reboot system and validate
- shutdown -r now
<yambe:breadcrumb self="Disabling IPv6">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>