I was getting below error while typing
showmount -e 192.168.56.2 in client machine
[root@client ~]# showmount -e 192.168.56.2 clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
This is my nfs server cinfiguration
nfs server ip 192.168.56.2
This is my nfs share
[root@www ~]# cat /etc/exports /files 192.168.56.7(rw,sync)
These are the two services running in server machine
[root@www ~]# service rpcbind status rpcbind (pid 2626) is running...
[root@www ~]# service nfs status rpc.svcgssd is stopped rpc.mountd (pid 2716) is running... nfsd (pid 2781 2780 2779 2778 2777 2776 2775 2774) is running... rpc.rquotad (pid 2712) is running...
This is my iptables rule
[root@www ~]# cat /etc/sysconfig/iptables # Generated by iptables-save v1.4.7 on Thu Oct 31 02:08:16 2013 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [5:388] -A INPUT -p tcp -m tcp --dport 111 -j ACCEPT -A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT # Completed on Thu Oct 31 02:08:16 2013
If I flush the iptales rule in server machine then my client is able to see nfs share
[root@client ~]# showmount -e 192.168.56.2 Export list for 192.168.56.2: /files 192.168.56.7
That means problem with iptables rule , can anybody tell me what is the problem with my iptables rule , am I missing any other port ? How to troubleshoot these types of problems ?
I tried this method from my client machine to verify port is listening or not and this is the output of that
[root@client ~]# telnet 192.168.56.2 111 Trying 192.168.56.2... Connected to 192.168.56.2. Escape character is '^]'.
[root@client ~]# telnet 192.168.56.2 2049 Trying 192.168.56.2... Connected to 192.168.56.2. Escape character is '^]'.