{"record":{"id":"4596dade551dc6ae","repo":"TechnitiumSoftware/DnsServer","slug":"protocolname-requires-ipv6-support-on-the-system","errorCode":null,"errorMessage":"{protocolName} requires IPv6 support on the system to work.","messagePattern":"(.+?) requires IPv6 support on the system to work\\.","errorType":"exception","errorClass":"DnsServerException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Dns/DnsServer.cs","lineNumber":6621,"sourceCode":"\n                case PlatformID.Win32NT:\n                    return Environment.OSVersion.Version.Major >= 10; //unix sockets are supported on Windows Server 2019 (oct update 1809), Windows 10 (Insider Build 17063), or later\n\n                default:\n                    return false;\n            }\n        }\n\n        #endregion\n\n        #region quic\n\n        internal static void ValidateQuicSupport(string protocolName = \"DNS-over-QUIC\")\n        {\n            if (!QuicConnection.IsSupported)\n            {\n                if (!Socket.OSSupportsIPv6)\n                    throw new DnsServerException(protocolName + \" requires IPv6 support on the system to work.\");\n\n                throw new DnsServerException(protocolName + \" is supported only on Windows 11 (build 22000 and later), Windows Server 2022 (and later), and Linux. On Linux, you must install 'libmsquic' manually.\");\n            }\n        }\n\n        #endregion\n\n        #region public\n\n        public async Task StartAsync(bool throwIfBindFails = false)\n        {\n            if (_disposed)\n                ObjectDisposedException.ThrowIf(_disposed, this);\n\n            if (_state != ServiceState.Stopped)\n                throw new InvalidOperationException(\"DNS Server is already running.\");\n\n            _state = ServiceState.Starting;","sourceCodeStart":6603,"sourceCodeEnd":6639,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/DnsServer.cs#L6603-L6639","documentation":"Thrown by ValidateQuicSupport (used by DoQ and DoH3) when QuicConnection.IsSupported is false AND Socket.OSSupportsIPv6 is false. QUIC on this stack is built atop IPv6-capable sockets; without OS IPv6 support, QUIC protocols cannot start.","triggerScenarios":"Enabling DNS-over-QUIC or DNS-over-HTTP/3 on a host with IPv6 disabled at the OS/kernel level (e.g. ipv6.disabled=1 on Linux, or IPv6 unchecked in Windows adapter properties).","commonSituations":"Hardened/containerized Linux images with IPv6 disabled; cloud instances without IPv6 addresses; system-level sysctl net.ipv6.conf.all.disable_ipv6=1; Windows Server with IPv6 binding restrictions.","solutions":["Re-enable IPv6 on the host: Linux sysctl -w net.ipv6.conf.all.disable_ipv6=0; Windows re-enable IPv6 on the adapter.","Disable DoQ/DoH3 listener if IPv6 cannot be enabled in your environment.","In Docker, run with --sysctl net.ipv6.conf.all.disable_ipv6=0 and a dual-stack network.","Verify with Socket.OSSupportsIPv6 (or `ping -6 ::1`) before enabling QUIC-based protocols."],"exampleFix":"# before: container launched with IPv6 disabled\ndocker run --sysctl net.ipv6.conf.all.disable_ipv6=1 ...\n\n# after\ndocker run --sysctl net.ipv6.conf.all.disable_ipv6=0 -p 853:853/udp ...","handlingStrategy":"validation","validationCode":"bool QuicCapable => System.Net.Sockets.Socket.OSSupportsIPv6 && System.Net.Quic.QuicConnection.IsSupported;\n// only enable DoQ/DoH3 when QuicCapable is true","typeGuard":"static bool CanEnableQuic() => System.Net.Sockets.Socket.OSSupportsIPv6 && System.Net.Quic.QuicConnection.IsSupported;","tryCatchPattern":"try { server.ValidateQuicSupport(\"DNS-over-QUIC\"); server.EnableDoQ = true; }\ncatch (DnsServerException ex) when (ex.Message.Contains(\"IPv6 support\")) { log.Warn(\"Cannot enable QUIC: enable IPv6 on the host\"); server.EnableDoQ = false; }","preventionTips":["Verify Socket.OSSupportsIPv6 before enabling QUIC protocols.","Enable IPv6 in containers with the right sysctls.","Disable DoQ/DoH3 where IPv6 is not available."],"tags":["quic","ipv6","doq","doh3","environment"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}