NFS configuration problem

Hello,

I’m trying to configure NFS but I have a problem. NFS Server is CentOS 7 machine and NFS Client is Ubuntu machine. On server side I’ve installed nfs-utils, added services to firewall nfs,mountd and rpc-bind in the public zone. Also I’ve configured /etc/exports file as you can se:

[armin@centos-r1 ~]$ sudo exportfs -v
/mnt/file_share_dir
                172.25.5.5(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

On the client side, I’ve installed nfs-common package and when I try to mount remote filesystem from NFS Server I got the issue that there is no route to the NFS server even I can ping it and establish ssh on it.

armin@ubuntu-h1:~$ sudo mount -t nfs 172.25.6.5:/mnt/file_share_dir /tmp/lfcs_share/
mount.nfs: No route to host

armin@ubuntu-h1:~$ ping centos-r1
PING centos-r1 (172.25.6.5) 56(84) bytes of data.
64 bytes from centos-r1 (172.25.6.5): icmp_seq=1 ttl=63 time=2.50 ms
64 bytes from centos-r1 (172.25.6.5): icmp_seq=2 ttl=63 time=2.50 ms
64 bytes from centos-r1 (172.25.6.5): icmp_seq=3 ttl=63 time=3.13 ms

Before that, I got the following error:

armin@ubuntu-h1:~$ sudo mount cetos-r1:/mnt/file_share_dir /tmp/lfcs_share/                                                                                                                                           
mount.nfs: Resource temporarily unavailable

Does anyone have any idea what should I do ?

Hello Dears,

a little update, when I stopped the firewalld on NFS server I was able to mount a remote filesystem on my NFS Client. I realised that after I’d tried rpcinfo command:

armin@ubuntu-h1:~$ rpcinfo -p 172.25.6.5                                                                                                          
172.25.6.5: RPC: Remote system error - No route to host

How I should configure the firewall on NFS Server side to be able to mount remote filesystem from my NFS client ?

And also, I made the huge mistake :frowning: I forgot to do firewall-cmd --reload after I’d changed configuration. Everything works fine now.