Difference between revisions of "CentOS 8.x Disabling IPv6"

From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Disabling IPv6">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb> =CentOS 8.x Disabling IPv6= ==Disable IPv6 using sysctl== #...")
 
m
 
Line 1: Line 1:
<yambe:breadcrumb self="Disabling IPv6">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x Network configuration|Network configuration]] > [[CentOS 8.x Disabling IPv6]]
=CentOS 8.x Disabling IPv6=


==Disable IPv6 using sysctl==
==Disable IPv6 using sysctl==
Line 50: Line 49:




<yambe:breadcrumb self="Disabling IPv6">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>
 
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x Network configuration|Network configuration]] > [[CentOS 8.x Disabling IPv6]]

Latest revision as of 03:52, 19 April 2022

Home > CentOS > CentOS 8.x > System Administration > Network configuration > CentOS 8.x Disabling IPv6

Disable IPv6 using sysctl

  1. First check whether IPv6 is enabled or not using:
    ip addr | grep inet6
  2. Create /etc/sysctl.d/70-ipv6.conf with following contents:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
  3. 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:

  1. Edit /etc/default/grub and append option:
    ipv6.disable=1
    in GRUB_CMDLINE_LINUX using:
    GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX ipv6.disable=1"
  2. Create updated grub configuration using:
    grub2-mkconfig -o /boot/grub2/grub.cfg
  3. Reboot system and validate
    shutdown -r now



Home > CentOS > CentOS 8.x > System Administration > Network configuration > CentOS 8.x Disabling IPv6