Re: FreeBSD NFS4 on custom TCP port (not 2049)?

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Sat, 23 Aug 2025 15:01:18 UTC
On Sat, Aug 23, 2025 at 7:38 AM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Fri, Aug 22, 2025 at 11:09 PM Lionel Cons <lionelcons1972@gmail.com> wrote:
> >
> > Do the FreeBSD NFS4 server and client support operating at a custom
> > TCP port (not TCP 2049)?
> > How can I set the TCP port number for the server, and how do I mount it?
> It does not do that now. You would have to patch the sources.
Actually, I was incorrect. If you change the lines that start with "nfsd" in
/etc/services, it will use whatever port# you specify there.

I do wonder why you would want to change it?
There can only be one instance of "nfsd" in each vnet jail (which means only
one running on the server if you are not using vnet jails), so why would you
want it at a different port#?

rick

>
> The RFC has always defined 2049 as the port# and FreeBSD does not
> have support for RDMA, which does use a different port#.
>
> rick
>
> >
> > Lionel
> >