Jaime Frutos Morales's blog


How to specify the listening ports of a NFS server on Red Hat 5

Filed under: Security, SysAdmin — acidborg @ 14:39

Description: by default, some NFS (both version 2 and 3) daemons on Red Hat 5 listen on random ports (statd, lockd, mountd, rquotad). In order to configure a firewall for this daemons, the incoming ports need to be fixed and not random. I’m going to use the following ports in this example: 4000 for statd, 4001 for lockd, 4002 for mountd and 4003 for rquotad.


  1. Edit /etc/sysconfig/nfs with this configuration:
    • STATD_PORT=4000
    • LOCKD_TCPPORT=4001
    • LOCKD_UDPPORT=4001
    • MOUNTD_PORT=4002
    • RQUOTAD_PORT=4003
  2. Restart your NFS server: service nfs restart ; service nfslock restart
  3. Configure your firewall rules to allow NFS traffic to this ports.

Blog at WordPress.com.

%d bloggers like this: