LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-13-2010, 07:41 PM   #1
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Rep: Reputation: 30
No route to host using showmount on Fedora 12


I have two system, an Intel Core2 Duo system running the 32-bit version of Fedora 12, and a MacBook Pro running the 64-bit version of Fedora 12.

I'm using the Gnome desktop on each system. I have enabled all the services I believe are necessary to support NFS including nfs, rpcbind, rpcgssd, rpcidmapd, and rpcsvcgssd on each system.

I have added an entry to my /etc/exports file to export my home on each system, and if I type this command:
$ showmount -e localhost

I get a result like this:
Export list for localhost:
/home/tron 192.168.200.101,192.168.200.100

However when I issue this type of command:
$ showmount -e <remote host name>

I get this kind of result:
rpc mount export: RPC: Unable to receive; errno = No route to host

Research on the Internet indicates this is usually due to a firewall problem. However, I use the Firewall Configuration application to the disable the firewall on both systems, and I continue to get the same result.

What is needed so I can get this two machines to display their exported file shares remotely?
 
Old 02-13-2010, 07:51 PM   #2
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
Looks like it is a firewall issue after all. It turns out I did not disable the firewall when I thought I had. Now that I'm certain the firewall is disabled on both systems, I'm able to get the showmount command to succeed.
 
Old 02-14-2010, 08:53 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can use the security configuration gui control to add services to allow through your firewall and enable the firewall again. It should enable all the ports that you need open.
111 for rpcbind
2049 is used as well.

You can modify the ports that the client expects in the mount command as well. See the nfs manpage for details on mount options such as udp, tcp, port=n, proto= (nfs4). The sec=mode settings may require an addition port for authentication to work.
 
Old 02-14-2010, 04:10 PM   #4
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
I'm not what the security configuration gui control is unless that refers to the Firewall Configuration application.

I have already configured that application to enable ports 111 and 2049 for the firewall.

I looked over the documentation of nfs, and it is not clear to me what I need to specify so the showmount command will succeed. Perhaps some examples would be useful.
 
Old 02-14-2010, 04:32 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
However when I issue this type of command:
$ showmount -e <remote host name>
From which machine did you do this?
If you are saying that you can't use showmount -e using the computers own host name, I wonder if it even has one. Some installs will give the computer the name localhost.localdomain initially so that you don't have two hosts on the network with the same hostname.

What does running "hostname" return? If you are trying this from another computer, what does
getent hosts <HOSTNAME>
return. That test will work whether a host is on the LAN or the internet, and is a way of testing whether your name resolving works.

If you depend on avahi to resolve host names on the lan, use "showmount -e HOSTAME.local" instead.
 
Old 02-14-2010, 05:54 PM   #6
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
I can issue:
Code:
$ showmount -e <remote host name>
From either computer and get the same result when <remote host name> is the name of the other computer.

Both computers have entries in their /etc/hosts files that specify the names and static IP addresses I applied to all the systems on my small home network.
 
Old 02-15-2010, 06:16 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Thanks. The first post didn't make that clear, and sometimes we find out later.

Quote:
I have enabled all the services I believe are necessary to support NFS including nfs, rpcbind, rpcgssd, rpcidmapd, and rpcsvcgssd on each system.
The last rpcgssd and rpcsvcgssd deal with authentication. If you don't use that type of authentication, you don't need them.
Code:
       sec=mode       The  RPCGSS  security  flavor to use for accessing files on this mount point.  If the sec option is not specified, or if sec=sys is specified, the NFS client uses
                      the AUTH_SYS security flavor for all NFS requests on this mount point.  Valid security flavors are none, sys, krb5, krb5i, krb5p, lkey, lkeyi, lkeyp, spkm, spkmi,
                      and spkmp.  Refer to the SECURITY CONSIDERATIONS section for details.
I found this webpage which explains which service matches which security model.
http://www.vanemery.com/Linux/NFSv4/...no-rpcsec.html
A lot of what you selected are for NFSv4 and not NFSv3. I don't know which you are using. The chart on that page should help determine the services and ports you need.

You could use nmap on another computer to list the open ports on your nfs server. Another way is to use the telnet client:
Code:
telnet elite 111
Trying 192.168.1.106...
Connected to elite.
Escape character is '^]'.

telnet elite 2049
Trying 192.168.1.106...
Connected to elite.
Escape character is '^]'.
en
This only checks for TCP ports, not UDP.
You may also need udp for port 111.
Whether you need TCP or UDP for NFS depends on how you have it configured. I have port 111 open for both and 2049/tcp open.
Port 111 is the one that the showmount command uses. This is the sunrpc port.

The error you saw, "rpc mount export: RPC: Unable to receive; errno = No route to host" could mean that you don't have your network or interface configured correctly. Maybe all ports have this problem.
 
Old 02-16-2010, 11:32 PM   #8
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
I am not certain if I am using NSFv4 or NSFv3. How would I determine such a thing?

I believe I will probably need NSFv3 because some of the systems on my network are Macintosh systems, and it is my understanding that Mac OS X does not support NSFv4.

In the Firewall Configuration application, I have NSF4 selected in the Trusted Services
I also have port 111 for both UDP and TCP added to Other Ports

nmap does not appear to be available on my system. I tried telnet, and it seems I could make a connection on both port 111 and 2049.

I do not I have a problem with ports in general. The systems can ping each other and they can connect via SSH.
 
Old 02-17-2010, 12:15 AM   #9
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by tron_thomas View Post
I am not certain if I am using NSFv4 or NSFv3. How would I determine such a thing?

I believe I will probably need NSFv3 because some of the systems on my network are Macintosh systems, and it is my understanding that Mac OS X does not support NSFv4.

In the Firewall Configuration application, I have NSF4 selected in the Trusted Services
I also have port 111 for both UDP and TCP added to Other Ports

nmap does not appear to be available on my system. I tried telnet, and it seems I could make a connection on both port 111 and 2049.

I do not I have a problem with ports in general. The systems can ping each other and they can connect via SSH.
What are the contents of /etc/sysconfig/nfs?
 
Old 02-18-2010, 11:25 PM   #10
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
Here are the contents of /etc/sysconfig/nfs:

#
# Define which protocol versions mountd
# will advertise. The values are "no" or "yes"
# with yes being the default
#MOUNTD_NFS_V1="no"
#MOUNTD_NFS_V2="no"
#MOUNTD_NFS_V3="no"
#
#
# Path to remote quota server. See rquotad(8)
#RQUOTAD="/usr/sbin/rpc.rquotad"
# Port rquotad should listen on.
#RQUOTAD_PORT=875
# Optinal options passed to rquotad
#RPCRQUOTADOPTS=""
#
#
# Optional arguments passed to in-kernel lockd
#LOCKDARG=
# TCP port rpc.lockd should listen on.
#LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
#LOCKD_UDPPORT=32769
#
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Turn off v2 and v3 protocol support
#RPCNFSDARGS="-N 2 -N 3"
# Turn off v4 protocol support
#RPCNFSDARGS="-N 4"
# Number of nfs server processes to be started.
# The default is 8.
#RPCNFSDCOUNT=8
# Stop the nfsd module from being pre-loaded
#NFSD_MODULE="noload"
#
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPCMOUNTDOPTS=""
# Port rpc.mountd should listen on.
#MOUNTD_PORT=892
#
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
#STATDARG=""
# Port rpc.statd should listen on.
#STATD_PORT=662
# Outgoing port statd should used. The default is port
# is random
#STATD_OUTGOING_PORT=2020
# Specify callout program
#STATD_HA_CALLOUT="/usr/local/bin/foo"
#
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
#RPCIDMAPDARGS=""
#
# Set to turn on Secure NFS mounts.
#SECURE_NFS="yes"
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
#RPCGSSDARGS=""
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
#RPCSVCGSSDARGS=""
#
 
Old 02-19-2010, 10:49 AM   #11
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by tron_thomas View Post
Here are the contents of /etc/sysconfig/nfs:

#
# Define which protocol versions mountd
# will advertise. The values are "no" or "yes"
# with yes being the default
#MOUNTD_NFS_V1="no"
#MOUNTD_NFS_V2="no"
#MOUNTD_NFS_V3="no"
#
#
# Path to remote quota server. See rquotad(8)
#RQUOTAD="/usr/sbin/rpc.rquotad"
# Port rquotad should listen on.
#RQUOTAD_PORT=875
# Optinal options passed to rquotad
#RPCRQUOTADOPTS=""
#
#
# Optional arguments passed to in-kernel lockd
#LOCKDARG=
# TCP port rpc.lockd should listen on.
#LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
#LOCKD_UDPPORT=32769
#
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Turn off v2 and v3 protocol support
#RPCNFSDARGS="-N 2 -N 3"
# Turn off v4 protocol support
#RPCNFSDARGS="-N 4"
# Number of nfs server processes to be started.
# The default is 8.
#RPCNFSDCOUNT=8
# Stop the nfsd module from being pre-loaded
#NFSD_MODULE="noload"
#
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPCMOUNTDOPTS=""
# Port rpc.mountd should listen on.
#MOUNTD_PORT=892
#
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
#STATDARG=""
# Port rpc.statd should listen on.
#STATD_PORT=662
# Outgoing port statd should used. The default is port
# is random
#STATD_OUTGOING_PORT=2020
# Specify callout program
#STATD_HA_CALLOUT="/usr/local/bin/foo"
#
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
#RPCIDMAPDARGS=""
#
# Set to turn on Secure NFS mounts.
#SECURE_NFS="yes"
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
#RPCGSSDARGS=""
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
#RPCSVCGSSDARGS=""
#
Uncomment the following...

Code:
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
STATD_PORT=662
Then add those ports to the firewall for both tcp/udp along with port 111 and keep NSF4 selected in the Trusted Services

You may have to reboot for this to work afterwards

If that dosen't work; post the output of...

Code:
ls -lZ /home/tron
and

Code:
getsebool -a |grep -i nfs
-C

Last edited by custangro; 02-19-2010 at 11:06 AM.
 
Old 02-19-2010, 11:49 PM   #12
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
That worked!!!

I can now mount NFS shares from on both systems from the other system.

There is another problem however, when I try to mount a share on a system running Mac OS X I get an error that says: Operation not permitted

I think this may be because my Linux systems are using NFSv4, and Mac OS X only supports up to NSFv3.

What can be done to get the mounting of NFS shares from Linux on Mac OS X working?
 
Old 02-20-2010, 12:17 PM   #13
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
I got things to work with the Macintosh. I had to make these changes the /etc/exports file on my Linux system:

home/tron 192.168.200.100(rw,insecure,no_root_squash) 192.168.200.102(rw,insecure,no_root_squash)

Now I can mount and access the NFS share from my Macintosh, however I have to have root access (i.e. I prefix commands like ls, cp, etc. with sudo). It is not perfect, however it will get the job done.
 
Old 02-20-2010, 06:55 PM   #14
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by tron_thomas View Post
I got things to work with the Macintosh. I had to make these changes the /etc/exports file on my Linux system:

home/tron 192.168.200.100(rw,insecure,no_root_squash) 192.168.200.102(rw,insecure,no_root_squash)

Now I can mount and access the NFS share from my Macintosh, however I have to have root access (i.e. I prefix commands like ls, cp, etc. with sudo). It is not perfect, however it will get the job done.
It's most likely a permissions issue...

Do both users exist on both hosts? Both with the same uid/gid?

-C
 
Old 02-20-2010, 07:15 PM   #15
tron_thomas
Member
 
Registered: May 2004
Posts: 221

Original Poster
Rep: Reputation: 30
I used the same account name on all my systems. I don't know that they all have the same user and group identifier. I forget how to check that. I suspect there may be some differences.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh: connect to host .....No route to host soumyacs Linux - Newbie 5 10-27-2009 10:03 AM
telnetd xinetd fedora - no route to host a_arthur Linux - Networking 4 10-07-2009 06:02 AM
Fedora Core 8 : Telnet Problem: No route to host keen4linux Linux - Networking 1 04-25-2008 06:55 AM
no route to host PenguinHead Linux - Networking 9 02-02-2005 02:03 PM
Need help setting up vsftd on Fedora (no route to host) Arodef Linux - Networking 3 08-24-2004 03:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration