Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16ADB738A for ; Wed, 23 Nov 2011 20:12:53 +0000 (UTC) Received: (qmail 7733 invoked by uid 500); 23 Nov 2011 20:12:52 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 7551 invoked by uid 500); 23 Nov 2011 20:12:52 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 7543 invoked by uid 99); 23 Nov 2011 20:12:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2011 20:12:52 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [173.201.192.107] (HELO p3plsmtpa06-06.prod.phx3.secureserver.net) (173.201.192.107) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 23 Nov 2011 20:12:44 +0000 Received: (qmail 23665 invoked from network); 23 Nov 2011 20:12:23 -0000 Received: from unknown (76.252.112.72) by p3plsmtpa06-06.prod.phx3.secureserver.net (173.201.192.107) with ESMTP; 23 Nov 2011 20:12:22 -0000 Message-ID: <4ECD53A4.4080503@rowe-clan.net> Date: Wed, 23 Nov 2011 14:12:20 -0600 From: "William A. Rowe Jr." User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: client_ip vs remote_ip References: <20111122150803.153fa012@baldur> <201111222217.51060.sf@sfritsch.de> <20111122214508.7dbf043e@baldur> <44C53D01-D6A7-4BFD-B12F-749097B0E781@webthing.com> <4ECD33C9.3070501@rowe-clan.net> <20111123182255.21ffaf37@baldur> In-Reply-To: <20111123182255.21ffaf37@baldur> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 11/23/2011 12:22 PM, Nick Kew wrote: > On Wed, 23 Nov 2011 11:56:25 -0600 > "William A. Rowe Jr." wrote: > >> +1 to this rename, it's much more sensible than "effective", "phys", >> "" et al, but reverse them. >> >> client_ip / client_addr is the immediate client of httpd, which may >> be a load balancer or transparent proxy or normal proxy if mod_remoteip >> has been introduced. > > Not really. The HTTP client is the end-of-line. The intermediary is > an HTTP proxy, not a client. Sorry. I mixed up 'client' with 'user agent' which are not exactly interchangeable. A better word here? >> remote_ip / remote_addr is the recognized _authenticated_ address. > > Indeed, that's terminology that goes right back to apache prehistory. It is the intent of all users to leverage the end user's IP for authn. That should be reflected in CGI etc below... >> This has the additional advantage of *breaking* existing c->remote_ip >> references and forcing the module author to choose which they mean for >> their purposes (most would refer to the authenticated address). > > An interesting take on it! > > But use of remote_ip and remote_addr goes further than that. > Changing their semantics in CGI (and its imitators from PHP to > mod_rewrite) would *silently* break apps, so a firm -1 to that. > And divorcing conn->remote_ip from the CGI/etc gets fearsomely > confusing! Ok... look, mod_remoteip does this today. Various x-remote-ip header hacks do the same thing for load balancers. What would break? The CGI values absolutely should be the end point (client's) address. Graham asks us to restore the immediate-next agent's IP address, to what ends I'm still not clear but apparently mainly for logging and diagnostics (which was already supported by mod_remoteip for all intermediary IPs). What he wants to do with the remaining remote intermediaries is not apparent. But his point is correct that it is challenging to track this in the conn rec given our request lifetime scope, and the fact that the successive clients on a single pipeline can and will change in many proxy/balancer scenarios. I completely agree remote_ip/addr is better tracked at req rec. We would just need a variable name in the conn rec for the persistant (default) ip address of the physical connection. And it seemed that you like the breakage to steer developers at the variable really of interest to them. client_ip wasn't it ;(