From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Stoiko Ivanov <s.ivanov@proxmox.com>
Subject: [pve-devel] applied: [PATCH proxmox-acme] fix #3390: standalone: explicitly bind to '::'
Date: Mon, 21 Jun 2021 09:36:08 +0200 [thread overview]
Message-ID: <037fce3d-26a1-34e0-6d0d-0b7a3f567aff@proxmox.com> (raw)
In-Reply-To: <20210512190452.22885-1-s.ivanov@proxmox.com>
On 12.05.21 21:04, Stoiko Ivanov wrote:
> This patch follows 2f8be3bfda203065b22e60862e5f98d831a46921 from
> pve-common:
> Instead of not specifying a listen address, we first try to bind on
> '::', which usually accepts connections for both ipv4 and ipv6,
> and fall back to '0.0.0.0' if this fails (if ipv6 is disabled via
> kernel commandline).
>
> The arguments are the same for HTTP::Daemon as for IO::Socket::IP,
> since the former has IO::Socket::IP as base.
>
> Additionally, by setting 'V6Only' explicitly to '0', the listening
> socket will also accept ipv4 connections, even if the sysctl
> 'net.ipv6.bindv6only' is set to 1 - the sysctl provides a default
> value, which can be overridden by a socket-option (see ipv6(7) -
> IPV6_ONLY).
>
> setting this option results in the following setsockopt-call being
> added:
> setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
>
> AFAICT the socket option is available and overridable on Linux > 2.4
> see [0] for an explanation of why this might not be wanted
>
> Overriding the default setting set by an admin might be debateable,
> but considering that the http-listener for the ACME challenge is
> rather short-lived I think this is justified. The only other option
> would be to create 2 listening sockets and binding on both - which
> would mean reorganizing our perl-deamons to deal with multiple listen
> sockets.
>
> quickly tested on a publicly reachable test-machine of mine with:
> * ipv6.domain.test (only AAAA record)
> * ip46.domain.test (both AAAA and A)
> * ipv4.domain.test (only A record)
> with:
> * sysctl net.ipv6.bindv6only=1 (for all 3 domains)
> * disabling ipv6 via kernel-commandline (only ipv4 tested)
> * disabling ipv6 via sysctl (only ipv4 tested)
> * only configuring an ipv6 address (only ipv6 tested)
>
> [0] https://man.openbsd.org/inet6.4
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> src/PVE/ACME/StandAlone.pm | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>
applied, thanks!
prev parent reply other threads:[~2021-06-21 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 19:04 [pve-devel] " Stoiko Ivanov
2021-06-21 7:36 ` Thomas Lamprecht [this message]
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=037fce3d-26a1-34e0-6d0d-0b7a3f567aff@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.ivanov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox