From 4139d42985afa8ad791ccc2c25bf61ec4f80093e Mon Sep 17 00:00:00 2001 From: AKaliumhexacyanoferrat Date: Fri, 10 Jan 2025 14:47:57 +0100 Subject: [PATCH] Fix Kestrel not listening on IPv6 --- Engine/Shared/Infrastructure/ServerBuilder.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Engine/Shared/Infrastructure/ServerBuilder.cs b/Engine/Shared/Infrastructure/ServerBuilder.cs index 74de4f3b..b7f4837c 100644 --- a/Engine/Shared/Infrastructure/ServerBuilder.cs +++ b/Engine/Shared/Infrastructure/ServerBuilder.cs @@ -153,7 +153,9 @@ public IServer Build() } else { - endpoints.Add(new EndPointConfiguration(IPAddress.Any, _Port, null, false)); + // we cannot bind to both IPv6 and IPv4 on linux + // listening to IPv6 will also listen to IPv4 due to dual-stack + endpoints.Add(new EndPointConfiguration(IPAddress.IPv6Any, _Port, null, false)); } }