LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-17-2007, 11:02 AM   #1
louisb
Member
 
Registered: Aug 2003
Posts: 199

Rep: Reputation: 15
Mounting an NFS volume on RHEL 5 Thru the Firewall


I'm running two RHEL 5 Servers both have firewall enabled. I'm trying to mount a NFS volume from one server to the other thru the firewall. I've created and entry in the iptables opening up port 2049 for TCP access only. The documentation for RHEL 5 server states that NFSv4 no longer uses port mapper but uses tcp thru port 2049.

Below the results of "exportfs -v":
/var/DownLoads <world>(rw,nohide,insecure,no_root_squash,no_subtree_check, fsid=0,anonuid=65534,anongid-65534)

Below in the mount command that I used:
mount -t nfs4 -v 192.168.10.7:/var/DownLoads testmount

Results of the above command:
mount: pinging: prog 100003 vers 4 prot tcp port 2049
mount.nfs4: mount point /root/testmount does not exist

I don't understand why the message is appearing because I'm logged on as "root" and the mount point/directory does exist. I've re-created it several times and continue to get the same results.

I've drop the firewall on the server that I'm trying to peform the mount on and the results are the same. "SELinux" is disabled on both systems.

Does anyone have any ideas?

Thanks
 
Old 09-17-2007, 11:13 AM   #2
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
mount -t nfs4 -v 192.168.10.7:/var/DownLoads testmount

I would put the absolute path to testmount

mount -t nfs4 -v 192.168.10.7:/var/DownLoads /root/testmount
 
Old 09-17-2007, 12:52 PM   #3
louisb
Member
 
Registered: Aug 2003
Posts: 199

Original Poster
Rep: Reputation: 15
I tried the absolute path and got the same results.

Thanks
 
Old 09-18-2007, 01:45 PM   #4
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
Hmmm this is a doozy. I will print this thread and ask the folks at my LUG meeting tonight.

Could be an option on your /etc/exports

Your are right about NFSv4 only needing TCP 2049 no portmapper needed...kinda cool.


Now you got me going....I need to learn more about NFSv4
 
Old 09-18-2007, 07:40 PM   #5
neelendhar
LQ Newbie
 
Registered: Feb 2007
Posts: 28

Rep: Reputation: 15
hi doublejoon

iam able to mount the nfs file system well,

but while nfs install with default settings nothing is changed like (no_root_squash) in /etc/exports

it is unable to mount the server directory with fire wall up.
and it is accepting with fire wall down.

what might be the reason still what ports to be opened for nfs install.

please help me..........
 
Old 09-19-2007, 06:46 AM   #6
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
well with nfs versions before version 4 you need both allowed thru firewall
nfs :TCP port 2049
nfs :UDP port 2049
port mapper :TCP port 111
port mapper :UDP port 111


So for CentOS/Redhat/Fedora something like: (you might want to filter source IP's)

in /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp --dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp --dport 111 -j ACCEPT

I believe UDP is the default protocol NFS will use

You can run tcpdump on the server then try mounting to give you some info

That should work.....

I still want to figure out this nfsv4 issue though.
 
Old 09-21-2007, 06:22 AM   #7
neelendhar
LQ Newbie
 
Registered: Feb 2007
Posts: 28

Rep: Reputation: 15
umm .............

i forget to oprn udp port for nfs ...........

which matters while installing.

thanks
for that doublejoon
 
Old 10-05-2007, 01:02 PM   #8
tecnalb
LQ Newbie
 
Registered: Oct 2007
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by louisb View Post

I've drop the firewall on the server that I'm trying to peform the mount on and the results are the same. "SELinux" is disabled on both systems.

Does anyone have any ideas?

Thanks

Don't know if you got the answer yet but NFS4 is not like 2 or 3. It will provide service as a root filesystem. So in your mount line, simply remove the path information past the first "/"

mount -t nfs4 <address>:/ /dev/testmount or whatever and it will mount.

The error messages that mount issues are confusing.
 
  


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
RHEL 5 SELinux and NFS louisb Linux - Security 2 08-17-2007 07:38 PM
Using ACL on an nfs exported volume rajsand Linux - Newbie 0 07-14-2006 08:21 AM
NFS mount of VxVM volume in SLES9 dussel Linux - Software 0 12-05-2005 06:01 AM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
can't umount nfs volume GŠutama Linux - Networking 0 07-10-2003 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:56 AM.

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