Page 2 of 2

Re: Mounting remote share through nfs

Posted: 2020/05/18 10:32:59
by TrevorH
Now I want to know how to modify iptables to solve this issue ? I am using CentOS 7- Minimal.
If this is the case then it's the rules on the NFS _server_ that need to be amended.

Re: Mounting remote share through nfs

Posted: 2020/05/18 11:01:39
by jlehtone
nitinkumar wrote:
2020/05/16 09:55:28
In order to debug this problem I have disabled firewall on both the machines.
Is that still true?
nitinkumar wrote:
2020/05/18 10:11:29
message comes after about 180 -200 seconds after the mount command is given.
The REJECT would come instantly. The 180-200s sounds like TCP timeout.

MartinR has a good point.

Re: Mounting remote share through nfs

Posted: 2020/05/19 08:56:00
by nitinkumar
the command with verbose option

# mount -t nfs 192.168.29.243:/nitin /mountpoint -v

gives following error ------

mount.nfs: trying text based options ' vers=4.1,addr=192.168.29.243,client addr=192.168.29.72'
mount.nfs: mount(2): no route to host

The above two sentences keep repeating on screen unless stopped by Ctrl-C

It is clearly evident that it is a network issue only with NFS. But both the machines are in the same network subnet and pinging.
I am unable to understand what more nfs is looking for. This is a simple connection between two local machines. Why firewall has
to interfere? I am not able to understand. "man nfs" also does not give any hint. /var/log/messages also do not indicate any error.

Re: Mounting remote share through nfs

Posted: 2020/05/19 11:27:27
by jlehtone
nitinkumar wrote:
2020/05/16 09:55:28
1) I am trying to mount a share on my centOS 7 Virtual machine from Red hat enterprise server 6
nitinkumar wrote:
2020/05/19 08:56:00
mount.nfs: trying text based options ' vers=4.1,addr=192.168.29.243,client addr=192.168.29.72'
mount.nfs: mount(2): no route to host
Does the server support 4.1? What does it support?

Does the server see the incoming request? I would listen there with tcpdump.

Re: Mounting remote share through nfs

Posted: 2020/05/21 18:15:32
by nitinkumar
Hello friends i have solved the problem. It was firewall which was preventing mounting the share. I stopped the firewall
in CentOS 7 VM using command " # systemctl stop firewalld " and it worked.

Earlier, i had only disabled firewall on my windows PC on which CentOS 7 was loaded as a VM using VMware workstation. Since VM was created
in bridge mode, ( bridging physical PC interface to virtual interface) I thought disabling firewall in windows PC will suffice. But After stopping firewall
in CentOS it straight away worked.

Thank you guys for helping me out debugging the issue. Especially Martin's post gave me the clue. Thank you very much Mr. Martin.

I have another query regarding kickstart centOS 7 which I will be sending in another post.

Re: Mounting remote share through nfs

Posted: 2020/05/22 05:05:27
by jlehtone
Now you should configure your firewalls to allow the NFS traffic. The "stop firewall" is a bad option.

Re: Mounting remote share through nfs

Posted: 2020/05/22 17:21:16
by nitinkumar
Certainly. I will have to configure firewall to allow nfs traffic. I will search NET to find out how to do it.

In case you have a short procedure to configure firewall on CentOS 7 you can share. If the procedure is very long, i will check on NET.

Re: Mounting remote share through nfs

Posted: 2020/05/22 18:40:15
by jlehtone
If the connection uses default zone, then:

Code: Select all

firewall-cmd --permanent --add-service=nfs
See https://access.redhat.com/documentation ... _firewalls

Re: Mounting remote share through nfs

Posted: 2020/05/25 08:25:54
by nitinkumar
Ya. It worked after allowing nfs traffic through firewall. Thanks.