大网数据广告活动
服务器运维问答

NFS client firewall settings and rpcbind

· 52CE 我爱测

I have a server (Debian 9.6) which mounts an NFSv3 share for backup purposes. Does it need any specific firewall settings ? I have found that rcpbind is listening on port 111 and 903 and is installed as a dependecy of nfs-common …

问题原文

原帖链接 · Max · CC BY-SA 4.0

I have a server (Debian 9.6) which mounts an NFSv3 share for backup purposes.

Does it need any specific firewall settings ?

I have found that rcpbind is listening on port 111 and 903 and is installed as a dependecy of nfs-common. However, if I block all ports with ufw and/or kill rpcbind, I can still mount the NFS share.

I don't understand why nfs-common depends on rpcbind if it works without it. Am I missing anything ? Maybe rpcbind is needed for file locking or nfs stats.

已采纳解答

原帖链接 · AtomiX84 · CC BY-SA 4.0

NFS servers normally run a portmapper or rpcbind daemon to advertise their service endpoints to clients. Clients use the rpcbind daemon to determine:

  • What network port each RPC-based service is using
  • What transport protocols each RPC-based service supports

The rpcbind daemon uses a well-known port number (111) to help clients find a service endpoint. Although NFS often uses a standard port number (2049), auxiliary services such as the NLM service can choose any unused port number at random.

From section "Mounting through a firewall" of nfs-common man page.

The reason why if you block access port and you are able to mount it is probably because the connection as been established from the client to the server, so no incoming connection are generated during mount operation, also when you kill the rpcbind process may the mount operation start it again.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-01-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。