Ubuntu 20.04, with IPTables firewall.
我明確允許 NFS 連接埠進入伺服器。返回(允許相關或已建立的會話)
我在 /etc/sysctl.conf 中為所有伺服器明確設定了連接埠:fs.nfs.nlm_udpport=38073
fs.nfs.nlm_tcpport=38747
33333 在 nfs-kernel-server 中設置
連接埠 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