You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/02/04 22:11:14 UTC

[Bug 57536] New: configurable source ip

https://issues.apache.org/bugzilla/show_bug.cgi?id=57536

            Bug ID: 57536
           Summary: configurable source ip
           Product: Tomcat Connectors
           Version: 1.2.40
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_jk
          Assignee: dev@tomcat.apache.org
          Reporter: aogburn@redhat.com

Could a feature be implemented to make the source ip configurable for mod_jk
connections?  For instance, if you have a secondary ip that httpd listens on,
the connections that mod_jk makes still come from the default primary ip.  It
may be preferable if they could come from the secondaryip.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57536] configurable source ip

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57536

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
What interfaces do you have on an example server? What interface/IP does mod_jk
currently choose? What interface/IP would you prefer mod_jk use?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57536] configurable source ip

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57536

Rainer Jung <ra...@kippdata.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Rainer Jung <ra...@kippdata.de> ---
I have committed the feature in r1658173.

It is marked experimental in docs and changelog, because it needs more testing
on various platforms. It should behave transparently if not configured.

I did not set SO_REUSEADDR deliberately. Otherwise we ould have to handle
EADDRINUSE during connect(). We'll see whether not setting SO_REUSEADDR is OK
for most users (enough free ephemeral ports).

It will be part of version 1.2.41.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57536] configurable source ip

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57536

--- Comment #4 from Aaron Ogburn <ao...@redhat.com> ---
Rainer's summation of the feature request is spot on.  Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57536] configurable source ip

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57536

--- Comment #3 from Rainer Jung <ra...@kippdata.de> ---
Some technical details:

https://idea.popcount.org/2014-04-03-bind-before-connect/

I haven't checked the validity of each statement, but there seems to be now
much info around for using bind() on the client side. Must have a look at
Stevens.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57536] configurable source ip

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57536

--- Comment #2 from Rainer Jung <ra...@kippdata.de> ---
I think he wants an optional IP config attribute per worker. That IP would be a
locally configured ip chosen by the admin. mod_jk would then bind() to that IP
before doing the connect(). One choses port 0 and sets SO_REUSEADDR. bind() is
typicaly used before accept() (server side) and not before connect() (client),
but is is allowed for the client as well and for complex systems can do
something useful. If there are multiple local IPs and/or multiple possible
interfaces and routes form the web server to the backend, you can chose from
which IP the connection from the point of view of the backend comes.

Sometimes you can work around not being able to configure that IP by setting
host routes on the web server but for that solution you need to have root
access.

I think it is a useful extension and not an exotic feature, though most people
will not have a need to use it. The few who need it really need it :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org