Disable IPV6 on Ubuntu

Add three lines to the sysctl.conf file and restart sysctl.


# sudo vi  /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

# sudo sysctl -p