rajeshkumar created the topic: Disable IPv6 and Enable IPv4 in Red Hat Linux
Disable IPv6 and Enable IPv4 in Red Hat Linux
check “disable_ipv6″ file to check if IPv6 is disabled,enter:
[root@devops ~]# cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0
if you get “0” value, it means that IPv6 is enabled and “1” means it is disabled.
How to Disable IPv6 in linux system?
vim /etc/sysctl.conf
Adding the below lines into that file:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Save and close that file, then restart sysctl with the following command:
[root@devops ~]# sysctl -p
Now you can rerun the “ifconfig” command to check if IPv6 lines have been removed.
To Enabled IPv4
Edit “/etc/sysconfig/network-scripts/ifcfg-eth0″ file, which is your defualt first NIC configuration file.
If you are using DHCP server to take IP then, edit it like this;
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=”yes”
BOOTPROTO=”dhcp”
Save & restart networking service,
#service network restart OR
#/etc/init.d/network restart
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals