LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mounting an NFS volume on RHEL 5 Thru the Firewall (https://www.linuxquestions.org/questions/linux-server-73/mounting-an-nfs-volume-on-rhel-5-thru-the-firewall-585305/)

louisb 09-17-2007 11:02 AM

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

doublejoon 09-17-2007 11:13 AM

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

louisb 09-17-2007 12:52 PM

I tried the absolute path and got the same results.

Thanks

doublejoon 09-18-2007 01:45 PM

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

neelendhar 09-18-2007 07:40 PM

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..........

doublejoon 09-19-2007 06:46 AM

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.

neelendhar 09-21-2007 06:22 AM

umm .............

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

which matters while installing.

thanks
for that doublejoon

tecnalb 10-05-2007 01:02 PM

Quote:

Originally Posted by louisb (Post 2894686)

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.


All times are GMT -5. The time now is 01:31 AM.