A photo of Mitesh Shah

Mitesh Shah

Linux Expert | Automation Enthusiast | Security Consultant

Email Skype Github Twitter Resume Hire Me Keybase LinkedIn Stackoverflow

Disable IPv6


Check IPv6 is Enabled/Disabled

[mitesh@Matrix ~]$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

NOTE! If above command return
1 means ipv6 is completely disabled
0 means ipv6 is not completely disabled

Disable IPv6

Temporary Disable IPv6

[mitesh@Matrix ~]$ echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6

NOTE!: Above command disable IPv6 untill your system reboot.

Permantly Disable IPv6

  • Open /etc/sysctl.conf file and add following lines
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
  • Now run following command
[mitesh@Matrix ~]$ sudo sysctl -p

Post Navigation