Search Our Database
How to disable ipv6 on Centos
1. Check the ipv6 on your server
2. Go to the file /etc/sysctl.conf
vim /etc/sysctl.conf
3. Add these lines to the file, then save and exit the file (:wq)
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
4. Run this command to load the file settings
sysctl -p
5. Go to /etc/ssh/sshd_config
vi /etc/ssh/sshd_config
6. Add this line to the file, then save and exit the file (:wq)
AddressFamily inet
7. Restart sshd for changes to get effect
systemctl restart sshd
8. ipv6 has been disable