TCP port 993 hijacked by mountd, rpc.statd

Martin Ward Martin.Ward at
Mon Aug 22 11:49:55 GMT 2005

Way back on Wed Jun 2 07:13:23 PDT 2004 on freebsd-questions you wrote:
> I have a production mail server that runs imaps.  Sometimes when I reboot,
> tcp port 993 (imaps according to /etc/services) is taken by either
> rpc.statd or (currently) mountd before inetd starts, which causes imaps to
> fail.

I just had the same problem with my Linux Mandrake system.
I found your message via Google.

One solution I found is to tell mountd and statd to use a particular
port, instead of the random one assigned by portmap, using the -p option.

On my system, mountd and statd are started up by /etc/rc.d/init.d/nfs
which reads /etc/sysconfig/nfs for confif options. I just had to uncomment
two lines in /etc/sysconfig/nfs:

# Pin mountd to a given port rather than random one from portmapper

# Set fixed port for statd

If you can find the startup script that starts mountd and statd and add
"-p 4002" to mountd and "-p 4000" to statd, then that should fix the problem.

/etc/sysconfig/nfs has similar entries for lockd:


But the man page says that rpc.lockd "is usually not requred".


Martin.Ward at Erdos number: 4
G.K.Chesterton web site:

More information about the freebsd-questions mailing list