IPv6 is not really news, but unfortunately there may still be situations where an application tries to make a particular connection using IPv6 although only IPv4 is set up usuable.
The following config snippets should help to enforce a particular IP variant in dual-stack setups or situations.
Be aware that applications may ignore the following settings, or only respect them when the application is restarted.
To have most applications use IPv4 connections, uncomment the following line in /etc/gai.conf:
precedence ::ffff:0:0/96 100
|Application||Command line options||Config file options||Config file names, Remarks|
java.net.preferIPv6Addresses = [ true | false ]
Probably obsolete, from 2009: Java in Ubuntu/Debian: Sometimes these JVM parameters are not enough. As documented in Ubuntu bug 486215 and Eclipse bug 298515 it may also be required to set
/sbin/sysctl net.ipv6.bindv6only=0 respectively editing