Pivotal Knowledge Base

Follow

How to disable the Ipv6 on Linux

Goal

How to disable ipv6 on the unix ?

Solution

  • Take the backup of the /etc/sysctl.conf file.
  • Check the value of the parameter "disable_ipv6" under eth* using the command below
sysctl -a | grep disable | grep ipv6

for eg.s my current value is

[root@mdw ~]# sysctl -a | grep disable | grep ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.eth1.disable_ipv6 = 0
net.ipv6.conf.eth2.disable_ipv6 = 0
net.ipv6.conf.eth3.disable_ipv6 = 0
  • Change those entry to 1 (for disabling) in the /etc/sysctl.conf file
[root@mdw ~]# sysctl -a | grep disable | grep ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.eth1.disable_ipv6 = 1
net.ipv6.conf.eth2.disable_ipv6 = 1
net.ipv6.conf.eth3.disable_ipv6 = 1
  • reload the configuration using sysctl -p or by rebooting the server

Comments

Powered by Zendesk