Disable ipv6 in Ubuntu 18.04 server

If you want to disable ipv6 in Ubuntu 18.04 server you can do this by editing the file: /etc/default/grub. Add ipv6.disable=1 to the two lines as shown below.

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

After that you need to update grub and reboot the server:

sudo update-grub
sudo reboot

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.