On some hosts I don’t have the ability to use IPv6, therefor I prefer to completely disable it.
To disable IPv6 you have to add the following lines to /etc/sysctl.conf.
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
Then simply reload the configuration
sysctl -p
You can verify if it was successfully loaded with the contents of /proc.
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
This should result into 1 (one) if successfully loaded.
When done allright these settings should be persistent if the machine reboots.