[pve-devel] [PATCH v3 http-server 3/3] utils: add LISTEN_IP option in /etc/default/pveproxy
Dylan Whyte
d.whyte at proxmox.com
Tue Mar 23 14:30:48 CET 2021
Hi,
Tested various valid input and seems to work for me.
As discussed, one has to be careful to give local ipv6 addresses in the
form `LISTEN_IP=fe80::...::4579%interface`, in order for these address
types to work.
Tested-by: Dylan Whyte <d.whyte at proxmox.com>
Reviewed-by: Dylan Whyte <d.whyte at proxmox.com>
On 3/22/21 3:00 PM, Oguz Bektas wrote:
> to allow setting arbitrary IP address to listen on
>
> Signed-off-by: Oguz Bektas <o.bektas at 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..36e3ae6 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 \"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;
More information about the pve-devel
mailing list