NFS port range

Petr Janda elekktretterr at exemail.com.au
Thu Nov 9 02:52:26 PST 2006


Thanks Oliver,
Im just looking at the output of rpcinfo -p and there seems to be a 
whole bunch of ports like portmap , nlockmgr and others. What about them?
Petr

Oliver Fromme wrote:
Petr Janda wrote:
 > Im trying to find some page documenting which ports NFS uses. I know it 
 > uses dynamic ports. Also is there anyway to make the ports static so I 
 > can just open a few ports in my firewall and thats it.

Basically two port numbers are involved, one for the mount
protocol, and one for the actual NFS traffic.  The latter
is always 2049 by convention, but the former is allocated
dynamically on some port below 1024 by default.  However,
mountd(8) has an option -p which specifies a fixed port
number.  So you simply have to start mountd(8) with that
option and choose a fixed, unused port number below 1024.
Then allow that port number and 2049 in your firewall.
(Beware:  mountd(8) will terminate with an error message if
it cannot allocate the specified port number.)
Best regards
   Oliver
  






More information about the Users mailing list