You are here

Disable IPv6 support in Ubuntu/Linux.

As many people know, Ubuntu supports IPv6 by default.
It's nice but sometimes you don't have chance to use IPv6 in your network environment.
And maybe, sometimes it brings few more complexity for your system administration tasks.

For example, if you set [i]listen_ip=0.0.0.0:80[/i] in a services daemon's config file and hope it can listen to all of the IPv4 IPs of your network interfaces, you might not get what you want.

This is because, if the daemon supports both IPv4 and IPv6, it will listen to [i]IPv6 :::80[/i] by default. That's why you cannot connect to your service even the network link is up.

[b]HOWTO:[/b]
There are many different, alternative, or strange ways people tell you that it can disable IPv6.
But the best way is using [u]/etc/sysctl.conf[/u] to disable it in your kernel.