> From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
> Subject: RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections
> from outside

There are some interesting comments in Sun's docs here:
http://java.sun.com/j2se/1.5.0/docs/guide/net/ipv6_guide/index.html

"Special IPv6 Address Types

"Unspecified address (:: corresponding to 0.0.0.0 in IPv4)

"This is also called anylocal or wildcard address. If a socket is bound to an 
IPv6 anylocal address on a dual-stack machine, it can accept both IPv6 and IPv4 
traffic; if it is bound to an IPv4 (IPv4-mapped) anylocal address, it can only 
accept IPv4 traffic. We always try to bind to IPv6 anylocal address on a 
dual-stack machine unless a related system property is set to use IPv4 Stack.

"When bound to ::, method ServerSocket.accept will accept connections from both 
IPv6 or IPv4 hosts. The Java platform API currently has no way to specify to 
accept connections only from IPv6 hosts."

Also:

"Normally, AF_INET6 sockets may be used for both IPv4 and IPv6 communications."

And further:

"IPv6 Networking Properties

"java.net.preferIPv4Stack (default: false)

"If IPv6 is available on the operating system, the underlying native socket 
will be an IPv6 socket. This allows Java(tm) applications to connect too, and 
accept connections from, both IPv4 andIPv6 hosts.

"If an application has a preference to only use IPv4 sockets, then this 
property can be set to true. The implication is that the application will not 
be able to communicate with IPv6 hosts.

"java.net.preferIPv6Addresses (default: false)

"If IPv6 is available on the operating system, the default preference is to 
prefer an IPv4-mapped address over an IPv6 address. This is for backward 
compatibility reasons—for example, applications that depend on access to an 
IPv4-only service, or applications that depend on the %d.%d.%d.%d 
representation of an IP address.

"This property can be set to try to change the preferences to use IPv6 
addresses over IPv4 addresses. This allows applications to be tested and 
deployed in environments where the application is expected to connect to IPv6 
services."

The above article also claims that Windows is a single-stack platform, which 
was not my impression for current Windows versions (the article predates Vista 
and its follow-ons, e.g., Server 2008).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

Reply via email to