On 1/23/2015 3:05 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 1/23/15 3:35 PM, André Warnier wrote:
Jess Holle wrote:
It seems that
java.net.InetAddress.getLoopbackAddress().getHostAddress() should
give the right answer -- if one is running with Java 7.

That said, is there a value that can be used for AJP's "address"
attribute that simply does the right thing here?

On 1/23/2015 1:38 PM, Jess Holle wrote:
I'd like to set the "address" attribute on the AJP connector
when deploying Tomcat to only allow loopback connections.

But I want to do so in a general way that works for:

* IPv4 * IPv4 + IPv6 mixed/dual stack * IPv6 (pure)

Is there any such option?  The documentation speaks of setting
127.0.0.1, yet I see indications that this won't fly in a pure
IPv6 world.  If a single value won't work, is there any good
way to detect which stacks are available via Java APIs during
deployment?

If only one address per Connector can be specified, can you not
just use 2 <Connector>s, one for each ? They should not conflict.
That should definitely work (address="127.0.0.1" and address="::") but
one connector might be nice.

Maybe Tomcat could detect some magic value that is invalid for an
address (like "loopback") and then use
InetAddress.getLoopbackAddress() instead of a traditional address
lookup/resolution.

- -chris



localhost might be a good choice.

-Terence Bandoian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to