Hi,

On Thu, Apr 30, 2020 at 11:15 AM Mark Thomas <ma...@apache.org> wrote:

> On 29/04/2020 18:11, Christopher Schultz wrote:
> > Mark,
> >
> > On 4/28/20 13:33, Mark Thomas wrote:
> >> On 28/04/2020 16:30, Satya Kishore Thumu wrote:
> >>> Hi Chris, Post the Ghostcat changes tomcat now listens only on
> >>> ipv4 by default, what if somebody is using on IPv6, Tomcat starts
> >>> to listen on mapped IPv4 address which I think is not
> >> correct.
> >>> I know that we can use ::1 in IPv6. Is there a way tomcat can
> >>> listen on both loopback addresses when
> >> available.
> >
> >> Not that I am aware of with the Java API.
> >
> > I think we had discussed the possibility of looking for a "magic"
> > value in the address="..." field to go back to the previous behavior.
> > The problem is that any reasonable string you can choose can also be a
> > valid hostname that should, arguably, be used to resolve the IP
> > address of the interface (e.g. "localhost").
>
> There is the empty string. We could use that as equivalent to the
> wildcard address (listen on all interfaces).
>

The suggestion we discussed few weeks back was to have a special value for
"address" that would mean "localhost both IPv4 & IPv6", e.g.
"tomcat:localhost".
If this special value is used then Tomcat can create two Connector
instances, one for 127.0.0.1 and another for ::1, and use the rest of the
Connector settings for both of them.


>
> There is no option I am aware of (before or after the AJP changes) that
> would allow listening on just 127.0.0.1 and ::1
>
> > I think the only practical way to do this would be to add another
> > attribute like bindOnAllInterfaces="true" where we ignore the
> > "address" attribute. Or maybe "address" always wins, but
> > bindOnAllInterfaces="false" is the default.
>
> I'm not a fan of another attribute unless we really have to.
>
> > Because it is possible to bind to all interfaces, right? Just don't
> > specify a specific interface when creating the server socket?
>
> Yes.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to