You are here

Disable IPv6

Submitted by Alan Mels on Thu, 03/25/2021 - 04:55

1. Edit /etc/default/grub and add ipv6.disable=1 in line GRUB_CMDLINE_LINUX, e.g.:

  1. # cat /etc/default/grub
  2. GRUB_TIMEOUT=5
  3. GRUB_DEFAULT=saved
  4. GRUB_DISABLE_SUBMENU=true
  5. GRUB_TERMINAL_OUTPUT="console"
  6. GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
  7. GRUB_DISABLE_RECOVERY="true"

2. Regenerate a GRUB configuration file and overwrite existing one:

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

3. Restart system and verify no line “inet6” in “ip addr show” command output.

# shutdown -r now

4. Disable IPv6 support in Webmin:

  1. sudo nano /etc/webmin/miniserv.conf
  2.  
  3. ipv6=0
  4. /etc/webmin/start