Re: NFS mount problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Part of the problem, as you've found, is trying to get the NFS server to use "static" ports in portmapper instead of the more-or-less random ports used by default. Luckily, it's fairly easy to convince the different NFS components to do so. First, look for the file /etc/sysconfig/nfs, which controls most of the NFS daemons. Edit it to contain the following:

#  Force rpc.statd to run on port 4000
STATD_PORT=4000
#  Force lock daemon to run on port 4001
LOCKD_TCPPORT=4001
LOCKD_UDPPORT=4001
#  Force mountd to run on port 4002
MOUNTD_PORT=4002
#  Force rquotad to run on port 4003
RQUOTAD_PORT=4003

After restarting all the daemons, or just rebooting the server, the rpcinfo command should show all the services using the static ports.

You will then need to open these ports up in iptables to whaterver degree you need. I usually add something like the following lines in the appropriate part of the iptables file:

-A RH-Firewall-1-INPUT -p tcp -m tcp -m state --state NEW -m multiport -s 192.168.1.0/24 --dports 111,2049,4000,4001,4002,4003 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp -m state --state NEW -m multiport -s 192.168.1.0/24 --dports 111,2049,4000,4001,4002,4003 -j ACCEPT

This opens up all the ports needed to my local LAN.

It works for me, but your mileage may vary.
--
Jay Leafey - Memphis, TN
jay.leafey@xxxxxxxxxxxx

<<attachment: smime.p7s>>

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux