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 |
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 |
I tried the absolute path and got the same results.
Thanks |
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 |
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.......... |
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. |
umm .............
i forget to oprn udp port for nfs ........... which matters while installing. thanks for that doublejoon |
Quote:
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. |