From nobody Thu Jun 04 13:14:06 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gWQ5H3GzLz6gGFP for ; Thu, 04 Jun 2026 13:14:27 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gWQ5G3VV4z3Ybj for ; Thu, 04 Jun 2026 13:14:26 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-6877c719cb0so944620a12.2 for ; Thu, 04 Jun 2026 06:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780578860; cv=none; d=google.com; s=arc-20240605; b=XtVLmbYM6+SNNSSwn5sz09gdl1aZeiFxgn9p5KylyULbT1r++sukDoRc+UKSwOaJaU IfKES9m6H07CN3lV4QLxDdUObPqkU/wRKsiy0PvSZGvo7RsRrCH9YTAhf9AvDeOqJomh f2MGgADhm7vY1ZGL/21P52pDUzg7y7GN2CF7TRCPtWuOw6AtfOdeWg5IWaxtPCbYPWLy tMRVylPqmMONzhv2XtuQZ0qgjEEtxlFYxhtQWx8sykqXManwq7R/IsqqNK+QDJKlpnVt Cn5N+SxxxWOGMZXK7B1AeKoSl4lLo4WNgxU0GK+Jwh746gUX6pEkU6wUpmEF0Ge9ZKfS UGYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BMv1FwPdzD0EG+PHa5xUTcTbvCdv7VxZsD3QUZU5vBY=; fh=mRhqTWhKjQ0Fhh6A65s+Chuj49vXP1ynEyJU18TzG5A=; b=YfAa+VUOJdHUuKV4PNsVRbbuoswdS6YpnVDOH4P93VWA7JIgw6GVldt+JRSDmrbeiz L9gVJ8lh4CyeqNdhjHzfob6vImi22jhseUkRxgu0VoIxSFXypqNCPpB3jz84d0jixcna wTdFW8qNkG0Inp99i5+t12pB/x+c+UzugSBruSOaitHZ/Vd5XN9MmO75ZQpWeQ2i58j4 ujA7lD54YTpi1JgkP3iq43Pv8pVh+yRZC8cDzNx96xDyPsqY+7lCv3FaAZOiuKEeMnwM 7DZyp597AoAOkfQJJP3xMNSRSGR4/8/oj07I3a2jfTThXiDVujsI1oJ2jgNx3CGkplof 5LIQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780578860; x=1781183660; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BMv1FwPdzD0EG+PHa5xUTcTbvCdv7VxZsD3QUZU5vBY=; b=Dmf8O3jZiPG6uDXVtGM/VacNGbgL9E/pPL5r0NGFyMClpZPUqjpHaDgoUfCDTT75Hk Bmp3wryk6i/fZMdXbhqvcD5lsZssyuOVVj7nKSfshGuqTyt+/6uGexef0g092ZUzt084 G3EAqzlHeRSB0iConc+7e8q45scrHLn4norbJhaJOEM2e3s3tuUM8xuLwcD9jzbnSCLf i3Vq4N/ryZ+ib1gGA+pmf2Y5Y/s3PzaHhlzmuzAKCPf0jDJy1hCqMZYpJwS8j1lbjJek DIgtXZw6V6yvq0iYaQpw2Z3I1Xe7fTgyC0Bb/uZfZM+8Q9Exe5IQHhzcJvH42lpX64gi rerA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780578860; x=1781183660; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BMv1FwPdzD0EG+PHa5xUTcTbvCdv7VxZsD3QUZU5vBY=; b=Dtb7r6TYkfAgK7VV6JjY5ysCeU+9ajJAmVuYRxCKTGLOlIZ9X8B9xSIsISeMv/l8rq EArU5G1WQILvmh7YgqJJA4ZZBky9Nu8+RSXvXZVea+m1X2opcFVy8pBoZ6+5mNgOMmVs ZAyHCPycXYhLJWKfVNmUYuNnahR2nLxt4paCbMyQHr9jJuNthQRTCYlp2rXEWPodp0am i4u6cgaBTPKxctRO7v39snRByXpOkGoWBqQAOLybn70SdWZAfZYvg5V/HMZM6FkZ2qU2 0kqMHWWwT+Wr/DhaIZc9CKto8Mo0Wx2GufBCVia267GdQdPiMP2nLFZpFCGIywKYYXny Ukgg== X-Forwarded-Encrypted: i=1; AFNElJ8e8JMAc1oLG3sq1LVvQOkIgoI9BR6Qpv68s5qamrAD6ShbTNQudNHu6oTC642duuesi43UVCVitPt5qfACRSg=@freebsd.org X-Gm-Message-State: AOJu0Yzc/0lUxh4PuYPLvVEvNV9dnOiLMaAtFWpXmaC0MWtrA8zbg7Sf IOCm7tTjbIy1mm1LItBAGkbRl59Q1Vxm643POkDhyyqDJpvZzxmqr9PF+Pqv3kGnxs/oA6XAfWR 5dZs1QZNSRDmXZw30snpx7JKQyuaO/Mxd X-Gm-Gg: Acq92OEiJ2u/a39Btcseayc1xwtOvqMBau/V8w0PGGIzKV2BY9I07BFHLIGbjZaF3rS b4NhMqLbGGHASJYdEeiOrD8bLi0qDMg327AzN5LC8wuMBj9TgGC2Hr9jWkZCzYqZTQ91zCjDPPI 67fbiyRSKE96onKDJ+SL8NE9TY2gX0e4iinPzCEjbGuEwff+1ZLF/SZzesQTtHJlotanUeIxO2c xTvV7VwvPgJ9hdgu76SN5nCru43bAga566CjbrvNe0t5EuiVDSUcVV5weQ3/aIw3arS0X73TKGY I5MUSDS5+XFAh8g5t07dnVgdUwLjkBJ/+8QEGgtULJSKCbHAUg== X-Received: by 2002:a05:6402:3485:b0:673:7412:1152 with SMTP id 4fb4d7f45d1cf-68e716ce7b4mr3673660a12.21.1780578859806; Thu, 04 Jun 2026 06:14:19 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Thu, 4 Jun 2026 06:14:06 -0700 X-Gm-Features: AVHnY4IG69CJB8wm3oG_V9Ey-sMAdm2ow_nK80RnUUyD0emENwNejET5ICmQeQA Message-ID: Subject: Re: ms-nfs41-client mount to FreeBSD 16.0 nfsd fails in VM with NAT To: Lionel Cons Cc: ms-nfs41-client-devel@lists.sourceforge.net, Freebsd hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4gWQ5G3VV4z3Ybj X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Thu, Jun 4, 2026 at 4:39=E2=80=AFAM Lionel Cons wrote: > > On Wed, 3 Jun 2026 at 08:07, Rick Macklem wrote: > > > > On Tue, Jun 2, 2026 at 9:52=E2=80=AFAM Lionel Cons wrote: > > > > > > We've hit a problem with ms-nfs41-client release 2026-06-01 with Free= BSD 16.0: > > > > > > If Windows runs in a VM with NAT an attempt to mount fails with Error > > > Code 59 (Unexpected network error), but if the VM has an IPv4 or IPv6 > > > address the mount succeeds. > > > > > > Lab technician says that it might be a problem that FreeBSD nfsd > > > rejects TCP connections from ports < 1024, "... because NAT cannot do > > > that automatically... " (yay, cryptic, and then he went home...). > > > > > > Can anyone please elaborate this in more detail? > > He might have meant the reverse. By default, the FreeBSD nfsd requires > > that a client use a reserved port# (which is < 1024). > > > > If that is the problem, you can do the following: > > - edit /etc/rc.conf and put a line in it like > > nfs_reserved_port_only=3D"NO" > > and then > > # sysctl vfs.nfsd.nfs_privport=3D0 > > - to change it immediately, without rebooting the server# > > That fixed the problem. > > Is there a setting which allows this per-export? No. > > > There are a few situations where requiring a reserved port# > > improves security, but it is mostly bunk. However, FreeBSD > > doesn't like defaults to change (it's referred to as a POLA > > violation), so the default remains "require it". > > Depends on the site. If this is a documented restriction, and you > violate that in the production server farms, then I will pay a > personal visit to the offending person. Outside the production farm I > will not care much. Well, in FreeBSD it is in "man mount_nfs". In general, the "only allow clients to use reserved port#s" has existed for NFS as long as I can recall (decades). I think Sun called it "secure NFS" long ago, although that was pushing it. It does improve security for some specific cases. Basically, if "su/root" on the client machine is trusted, but other processes/threads (user logins in the old days) are not, this protects against a malicious NFS client run by a "user". Anyone can easily write their own NFS client. rpcgen does a lot of the work and there are also libraries and lots of sample code. Without the reserved port# restriction, any user can construct one and do mounts from any machines exports (or firewalls) give access to, if they can get it to run on the systems. --> This might be discussed in the NFSv4 Security draft authored by David Noveck? At one time, I had FreeBSD configured to allow NFSv4 mounts without the restriction, which is consistent with what the original RFC3530 specified. (RFC3530 also assumed AUTH_SYS was going away in favour of RPCSEC_GSS.) --> Others complained this introduced a security vulnerability. --> It was also flagged as a security vulnerability be some widely used security checking software. If this doesn't provide enhanced security for your setup, you just disable it. rick > > Lionel >