nmap/mswin32
結友 168eb1a349
Windows: stop setting MaxUserPort and delete any existing value
nmap_performance.reg no longer sets MaxUserPort=0xfffe. It now contains
"MaxUserPort"=- instead, which deletes the value unconditionally: any
existing MaxUserPort is removed whenever the file is applied, whoever
set it, not only when an earlier Nmap installer wrote it. This is the
only way to undo what earlier installers did on upgrade. As before, the
file is only applied when the user opts into the "Network Performance
Improvements" installer section, and the dynamic port range itself
changes after the next reboot because MaxUserPort is read at boot.

MaxUserPort raised the ephemeral port limit on Windows 2000/XP/2003,
whose default dynamic port range was 1025-5000. Nmap dropped those
systems in 7.25BETA1, and since 7.92 the Windows binaries do not run on
Vista or earlier at all. On Windows Vista and later the default range is
already 49152-65535, and MaxUserPort instead widens it to 1024-65534.
That spreads every outgoing connection over the whole port space and
breaks software that needs a contiguous block of host ports: WSL2
mirrored networking fails with
CreateInstance/CreateVm/ConfigureNetworking/0x8007054f and falls back
to no networking (microsoft/WSL#13454, where several reporters traced
it to this installer option).

TcpTimedWaitDelay and StrictTimeWaitSeqCheck are unchanged. The install
guide now describes the deletion, the manual fix for users who do not
re-run the installer, and how to widen the ephemeral range with netsh
from a high starting port if a scan really needs more than 16384 ports.

Verified on Windows 11: applying the file with "regedt32 /S" deletes
MaxUserPort and sets the other two values. The installer itself was not
tested end to end.

Refs: GH#149
2026-11-06 10:47:13 +09:00
..
license-format
NET
NETINET
nsis Merge Nmap 7.96 release branch 2025-05-07 13:22:40 +00:00
Build.bat Fix windows autobuild: typo 2026-09-30 14:55:29 +00:00
icon1.ico
make-vars.h Use cli defines, not sed, to customize NSIS script. Also addresses #2316 2021-07-30 17:02:11 +00:00
Makefile Reintegrate Nmap 7.992 release branch 2026-10-15 22:30:27 +00:00
nmap.rc Change Insecure.Com LLC to Nmap Software LLC 2021-11-23 19:01:05 +00:00
nmap.sln Windows: use CMake to configure/build libdnet 2026-09-25 16:04:16 +00:00
nmap.vcxproj Windows: use CMake to configure/build libdnet 2026-09-25 16:04:16 +00:00
nmap_performance.reg Windows: stop setting MaxUserPort and delete any existing value 2026-11-06 10:47:13 +09:00
python-wrap.bat Add locations used by the official Python installer 2025-10-19 02:33:20 +00:00
resource.h
winfix.cc Add missing macro definition 2026-07-20 15:48:56 +00:00
winfix.h Remove unneeded includes of pcap.h on Windows 2019-05-29 15:22:25 +00:00