Skip to main content
2 of 2
adding further instructions to show how to edit & what to edit in sysctl.conf file to disbale/enable IPv6

To check if IPv6 is disabled through sysctl :

sysctl -a | grep disable_ipv6

If the output of above command shows configuration lines with ...disable_ipv6 = 1 then IPv6 is disabled.

To enable IPv6, edit the /etc/sysctl.conf file:

nano /etc/sysctl.conf
  • and then edit+change the 1 into 0 for below system configurations, and add below lines if does not-exist in the /etc/sysctl.conf file:
    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  
    
  • additionally also add these configuration lines (if does not pre-exist), to enable manual configurations of IPv6:
    net.ipv6.conf.all.autoconf = 0  
    net.ipv6.conf.all.accept_ra = 0  
    net.ipv6.conf.eth0.autoconf = 0  
    net.ipv6.conf.eth0.accept_ra = 0