Home >System Tutorial >LINUX >Disable IPv6 for CentOS 7, use only IPv4
centos7 uses the ipv6 protocol. If a problem occurs, it will be difficult to troubleshoot. So if you want to turn off ipv6, how should you turn it off? Let’s take a look at the detailed tutorial below.
1. Use the ifconfig command to check the network card information. If inet6 fe80::20c:29ff:fed0:3514 appears, it means that the machine has ipv6 enabled
2 , edit the /etc/sysctl.conf configuration, add net.ipv6.conf.all.disable_ipv6=1
##3, edit the /etc/sysconfig/network configuration, add NETWORKING_IPV6 =no, save and exit 4. Edit /etc/sysconfig/network-scripts/ifcfg-eno16777736, make sure IPV6INIT=no, ifcfg-eno16777736 is based on your own machine , judging from the actual network card information, it is not fixed 5. Turn off the firewall auto-start at bootsystemctl disable ip6tables.service 6. Execute sysctl -p or reboot command 7. Use ifconfig again to verify, only ipv4 remains, ipv6 disappears , closed successfullyThe above is the detailed content of Disable IPv6 for CentOS 7, use only IPv4. For more information, please follow other related articles on the PHP Chinese website!