无法从命令行挂载 NFS。从 fstab 运行良好。如果我禁用 iptables,则运行良好

无法从命令行挂载 NFS。从 fstab 运行良好。如果我禁用 iptables,则运行良好

Ubuntu 20.04, with IPTables firewall. 我明确允许 NFS 端口进入或退出服务器。返回(允许相关或已建立的会话)

我已在 /etc/sysctl.conf 中为所有服务器明确设置了端口:fs.nfs.nlm_udpport=38073

fs.nfs.nlm_tcp端口=38747

nfs-kernel-server 中设置 33333

防火墙出站和入站端口 111、1110、2949、33333、4045、38073、38747 均已打开。

当我尝试安装时,我得到了以下信息:

mount.nfs: timeout set for Fri Sep 15 17:25:35 2023
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.30.150,clientaddr=192.168.10.125'
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=192.168.30.150'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.30.150 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Unable to send - Operation not permitted
mount.nfs: Operation not permitted

但是,FSTAB 中的相同挂载可以正常挂载(在重启期间)

====编辑========

但是...如果我刷新 IPTABLES,它就可以工作了...但仍然显示“没有这样的”消息

mount.nfs: timeout set for Sat Sep 16 12:47:04 2023
mount.nfs: trying text-based options 
 vers=4.2,addr=192.168.30.150,clientaddr=192.168.10.125'
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=192.168.30.150'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.30.150 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: portmap query retrying: RPC: Timed out
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying 192.168.30.150 prog 100005 vers 3 prot TCP port 33333

相关内容