]> git.proxmox.com Git - pve-http-server.git/commitdiff
utils: add LISTEN_IP option in /etc/default/pveproxy
authorOguz Bektas <o.bektas@proxmox.com>
Mon, 22 Mar 2021 14:00:45 +0000 (15:00 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Apr 2021 15:44:03 +0000 (17:44 +0200)
to allow setting arbitrary IP address to listen on

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Tested-by: Dylan Whyte <d.whyte@proxmox.com>
Reviewed-by: Dylan Whyte <d.whyte@proxmox.com>
PVE/APIServer/Utils.pm

index e843e5ff95b81daacbe39710b661d4dbe09b1227..36e3ae63b1c1f126b2293d63d11e4ea8c505aa79 100644 (file)
@@ -14,6 +14,7 @@ sub read_proxy_config {
 
     # Note: evaluate with bash
     my $shcmd = ". $conffile;\n";
+    $shcmd .= 'echo \"LISTEN_IP:\$LISTEN_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 'LISTEN_IP') {
+           $res->{$key} = $value;
        } elsif ($key eq 'POLICY') {
            die "unknown policy '$value'\n" if $value !~ m/^(allow|deny)$/;
            $res->{$key} = $value;