LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 09-19-2010, 05:27 PM   #1
theillien
Member
 
Registered: Jan 2004
Posts: 107

Rep: Reputation: 0
Question Problem mounting NFS share


I just installed RHEL 6 Beta 2 on an extra workstation. The installation process is more streamlined than in previous iterations including the elimination, it seems, of running any first boot utility post-install. This takes away the option of turning iptables off out of the gate. I decided to take this as an opportunity to learn a little more about iptables so I left it running.

One thing I'm trying to do is get it set up as an NFS server for installing VMs on my regular workstation. iptables naturally keeps most things out so I had to figure out how to open it up for NFS. I found a post at nixCraft that explains opening up ports. I add the rules and restart iptables on the server but I'm still unable to connect.

From my local workstation I'm trying to mount the directory (after having set it up for sharing out, of course) but it fails:

Code:
msnyder@msnyder:~/.ssh> sudo mount -v -t nfs 192.168.4.231:/var/ftp/pub /mnt
mount.nfs: timeout set for Sun Sep 19 17:54:53 2010
mount.nfs: text-based options: 'nolock,addr=192.168.4.231'
mount.nfs: trying 192.168.4.231 prog 100003 vers 3 prot TCP port 2049
mount.nfs: trying 192.168.4.231 prog 100005 vers 3 prot UDP port 44042
mount.nfs: text-based options (retry): 'nolock,addr=192.168.4.231,nfsvers=3,proto=tcp,mountproto=udp'
192.168.4.231:/var/ftp/pub on /mnt type nfs (rw,nolock)
I've tried it with and without portmap running on the client side. When trying without portmap running I use the '-o nolock' option. No rule is listed for port 44042. Should I create that?

Code:
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p udp --dport 111 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p tcp --dport 111 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p tcp --dport 32803 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p udp --dport 32769 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p tcp --dport 892 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p udp --dport 892 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p tcp --dport 875 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p udp --dport 875 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p tcp --dport 662 -j ACCEPT
-A INPUT -s 192.168.4.0/24 -m state --state NEW -p udp --dport 662 -j ACCEPT
I turned off iptables and verified that I can mount the share. Additionally, if I comment out all the rules above and use the firewall config utility that Red Hat provided, enabling NFS4, a single rule for port 2049 is created. If I then try to connect I seem to get further but it still fails:

Code:
msnyder@msnyder:~/.ssh> sudo mount -v -t nfs -o nolock 192.168.4.231:/var/ftp/pub /mnt
mount.nfs: timeout set for Sun Sep 19 18:23:09 2010
mount.nfs: text-based options: 'nolock,addr=192.168.4.231'
mount.nfs: Unable to connect to 192.168.4.231:111, errno 113 (No route to host)

mount.nfs: mount to NFS server '192.168.4.231:/var/ftp/pub' failed: System Error: No route to host
Seeing that I uncommented both the rules for port 111 which then just leaves me with the same error as before.

Can anyone provide some insight into what I might be doing wrong or not doing that I should be?

*EDIT for addition information: I noticed that my client (on openSUSE 11.2) is trying to connect using NFSv3 based on the error above but, Red Hat's firewall utility only lists NFSv4 as an option. Will this make a difference?

Last edited by theillien; 09-19-2010 at 05:34 PM.
 
Old 09-19-2010, 05:38 PM   #2
theillien
Member
 
Registered: Jan 2004
Posts: 107

Original Poster
Rep: Reputation: 0
Apparently the different versions *does* matter. I issued the mount command using '-t nfs4' instead of '-t nfs' and the share mounted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NFS share not mounting SUSE-OES Linux - Server 3 03-09-2009 06:13 PM
Problem mounting NFS share at boot amishtechie Linux - Networking 1 03-17-2007 10:23 PM
mounting nfs share jon23d Slackware 4 06-25-2006 03:19 AM
Mounting an NFS share w/wireless cwwilson721 Slackware 1 03-31-2006 09:04 PM
mounting a NFS share using samba phatboyz Linux - Software 2 03-30-2004 12:26 PM


All times are GMT -5. The time now is 05:47 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration