From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 4AF4C1FF16B
	for <inbox@lore.proxmox.com>; Thu, 12 Dec 2024 04:28:13 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id A783212176;
	Thu, 12 Dec 2024 04:28:19 +0100 (CET)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1733974060; x=1734578860;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ndEw8K7qNcBpRp5WDLItxaVtMi82dVcHt9KZD980CPg=;
 b=MexKdZRw/iiUgJ3klFNkfNgGGi6oqnEP/QZHYS5BHRiMaK5ghsP8ncM3q6iO7I6xaw
 mJeGfBCtMYcbRGWhy13BT5h1FSQhmbHFuUcdtLS+gqySuHjVJJe2XNVsYlc4o+xG190a
 qyO8Wfa59lCUOEno7mUqqasfGyhauTYxheAJSrdQiCwFqwAPRJPPruLkDck8dRONWfQW
 EeH9jhLV9J8bwjzurGOTnvmuheZRdIJ905HhmjoQMQ1RDnjn//Y9IABgvNIjZ9gbi49K
 1yz7D6G/0OeHQNrd7zigQ7Pg8Gm6jWQ4QiviNSb5yLnXcnd259eTsHWh52qj6xUBwY31
 sGrg==
X-Gm-Message-State: AOJu0Yz7iDbO3xA59x9cXqtq40EkqRaeKY6n1qOSptBjXYWb5ko8fKio
 TJiSJnV7Rr1AAsPVeIfJTkUn26SPaOG+8jZ19kI9hX+gaf2cH654+YKr3u+F
X-Gm-Gg: ASbGncsm9Te7lykw0kgNcZzJWdxsYIERujZ6BpblGXHepMrAZdUfqhErFp9Zv0buUNu
 47c5yReN56XYd1YjQMGMOFQuOO2I9OTmwLvy9R2GivGT/7wB1O+ccukC4vtqXt0CXk5k54mZsqj
 WOMgcGooT50KmGkjMX0YdzVc/Hipp+M43sYP8HIboor6/gBqc7lHIOynWQMeh8J3DUjKzGCE8Vu
 cEeGaGSMJp+LTo4XJt0dY4QQoeXlwylvqmOLjQO6l/3qpvfWCzuxxJHNSyjLlQjWS4GgWH6lywR
 iKp14kjiWAWhYm5k1GujuMV58SiSsTcnLHT6Fmo2SA0DDZ+AnrlJcwedTihH/8HNtODxLA==
X-Google-Smtp-Source: AGHT+IG5Fc8/kObXl9tWRYu/W7D9JQmkIG00Iy9Lqg0h50YzK9M/g/xp/53fopC+sbAFGeaanQRTeA==
X-Received: by 2002:a05:6902:2304:b0:e39:80b9:3344 with SMTP id
 3f1490d57ef6-e3d8f6765admr1563243276.3.1733974060424; 
 Wed, 11 Dec 2024 19:27:40 -0800 (PST)
From: Thomas Skinner <thomas@atskinner.net>
To: pve-devel@lists.proxmox.com
Date: Wed, 11 Dec 2024 21:27:04 -0600
Message-Id: <20241212032706.151121-2-thomas@atskinner.net>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20241212032706.151121-1-thomas@atskinner.net>
References: <20241212032706.151121-1-thomas@atskinner.net>
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.029 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 FREEMAIL_FORGED_FROMDOMAIN 0.001 2nd level domains in From and EnvelopeFrom
 freemail headers are different
 FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider
 HEADER_FROM_DIFFERENT_DOMAINS 0.249 From and EnvelopeFrom 2nd level mail
 domains are different
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/,
 no trust RCVD_IN_MSPIKE_H2      -0.001 Average reputation (+2)
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] [PATCH docs v2 1/3] fix #5699: pveproxy: add docs for
 real IP support
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Thomas Skinner <thomas@atskinner.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

Signed-off-by: Thomas Skinner <thomas@atskinner.net>
---
 pveproxy.adoc | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/pveproxy.adoc b/pveproxy.adoc
index 4b5dac0..29f54d7 100644
--- a/pveproxy.adoc
+++ b/pveproxy.adoc
@@ -198,6 +198,35 @@ content, if the client supports it. This can disabled in `/etc/default/pveproxy`
 
  COMPRESSION=0
 
+[[pveproxy_real_ip]]
+Real Client IP Logging
+----------------------
+
+By default, `pveproxy` logs the IP address of the client that sent the request.
+In cases where a proxy server is in front of `pveproxy`, it may be desirable to
+log the IP of the client making the request instead of the proxy IP.
+
+To enable processing of a HTTP header set by the proxy for logging purposes, set 
+`PROXY_REAL_IP_HEADER` to the name of the header to retrieve the client IP from. For
+example:
+
+ PROXY_REAL_IP_HEADER="X-Forwarded-For"
+
+Any invalid values passed in this header will be ignored.
+
+The default behavior is log the value in this header on all incoming requests. 
+To define a list of proxy servers that should be trusted to set the above HTTP
+header, set `PROXY_REAL_IP_ALLOW_FROM`, for example:
+
+ PROXY_REAL_IP_ALLOW_FROM="192.168.0.2"
+
+The `PROXY_REAL_IP_ALLOW_FROM` setting also supports values similar to the `ALLOW_FROM`
+and `DENY_FROM` settings.
+
+IP addresses can be specified using any syntax understood by `Net::IP`. The
+name `all` is an alias for `0/0` and `::/0` (meaning all IPv4 and IPv6
+addresses).
+
 ifdef::manvolnum[]
 include::pve-copyright.adoc[]
 endif::manvolnum[]
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel