我正在尝试在 Ubuntu 20.x 服务器上使用 NFSv3,并且需要设置静态端口才能使用 UFW。不幸的是,需要连接到此服务器的 Windows 10 仅支持 NFSv3,因此仅打开端口 2049 是不够的。
我尝试将端口添加到 /etc/default/nfs-kernel-server:
# Number of servers to start up
RPCNFSDCOUNT=64
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0
# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information,
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
RPCMOUNTDOPTS="--manage-gids"
# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""
# Options for rpc.svcgssd.
RPCSVCGSSDOPTS=""
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
STATD_PORT=662
RQUOTAD_PORT=875
虽然配置确实需要 64 台服务器来启动,但即使在重新启动后,它也没有在底部拾取端口配置。
有谁知道我在哪里可以正确设置这些?