Wednesday, January 29, 2020

Disable ipv6 on Linux

add ipv6.disable=1 in /etc/default/grub:

 vi /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora-swap ipv6.disable=1 rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

Attach below line in /etc/sysctl.conf

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

Regenerate grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg 

No comments:

Post a Comment