I am using Ubuntu 14.04. And I have done the following to disable ipv6.
I have open /etc/sysctl.conf using gedit and paste the following lines at the end of sysctl.conf.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1 But when I check it using following command,
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6I am getting result as '0'( i.e still Enabled). Please help me to disable ipv6, so that I can use hadoop.
I followed instructions from this link.
03 Answers
To disable ipv6, you have to open /etc/sysctl.conf using any text editor and insert the following lines at the end:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1If ipv6 is still not disabled, then the problem is that sysctl.conf is still not activated.
To solve this, open a terminal(Ctrl+Alt+T) and type the command,
sudo sysctl -pYou will see this in the terminal:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1After that, if you run:
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6It will report:
1If you see 1, ipv6 has been successfully disabled.
You might want to disable it right from the boot. For this purpose, open /etc/default/grub with your favorite text editor with root access (maybe sudo vi /etc/default/grub.
In this file, find this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"and change it to:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"Save the file and update grub by running:
sudo update-grub=============================
Mint 19 and Ubuntu 18.04:
on Mint 19 it would be "xed admin:///etc/default/grub" and maybe on Ubuntu 18.04 "gedit admin:///etc/default/grub" to get a GUI editor for doing the edits to the file. The rest of the steps will be the same.
2In addition to Ross Rogers answer above you should add:
sudo nano /etc/init/scip.conf
# description "Start sysctl at boot"
description "sysctl"
start on runlevel [2345]
stop on runlevel [016]
console log
respawn
respawn limit unlimited
exec /sbin/sysctl -p 3