all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Oguz Bektas <o.bektas@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC 1/2 http-server] utils: add BIND_IP option in /etc/default/pveproxy
Date: Wed, 10 Feb 2021 17:01:41 +0100	[thread overview]
Message-ID: <20210210160142.1326921-2-o.bektas@proxmox.com> (raw)
In-Reply-To: <20210210160142.1326921-1-o.bektas@proxmox.com>

to allow setting arbitrary IP address to listen on

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 PVE/APIServer/Utils.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/APIServer/Utils.pm b/PVE/APIServer/Utils.pm
index e843e5f..94bacb8 100644
--- a/PVE/APIServer/Utils.pm
+++ b/PVE/APIServer/Utils.pm
@@ -14,6 +14,7 @@ sub read_proxy_config {
 
     # Note: evaluate with bash
     my $shcmd = ". $conffile;\n";
+    $shcmd .= 'echo \"BIND_IP:\$BIND_IP\";';
     $shcmd .= 'echo \"ALLOW_FROM:\$ALLOW_FROM\";';
     $shcmd .= 'echo \"DENY_FROM:\$DENY_FROM\";';
     $shcmd .= 'echo \"POLICY:\$POLICY\";';
@@ -36,6 +37,8 @@ sub read_proxy_config {
 		push @$ips, Net::IP->new($ip) || die Net::IP::Error() . "\n";
 	    }
 	    $res->{$key} = $ips;
+	} elsif ($key eq 'BIND_IP') {
+	    $res->{$key} = $value;
 	} elsif ($key eq 'POLICY') {
 	    die "unknown policy '$value'\n" if $value !~ m/^(allow|deny)$/;
 	    $res->{$key} = $value;
-- 
2.20.1




  reply	other threads:[~2021-02-10 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 16:01 [pve-devel] [RFC http-server manager 0/2] fix #2997: allow setting BIND_IP for proxy Oguz Bektas
2021-02-10 16:01 ` Oguz Bektas [this message]
2021-02-10 16:01 ` [pve-devel] [RFC 2/2 manager] proxy: allow setting BIND_IP for pveproxy Oguz Bektas
2021-02-10 16:20   ` Stoiko Ivanov
2021-02-15 10:00     ` Oguz Bektas
2021-02-10 17:02 ` [pve-devel] [RFC http-server manager 0/2] fix #2997: allow setting BIND_IP for proxy Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210210160142.1326921-2-o.bektas@proxmox.com \
    --to=o.bektas@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal