Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2005 12:49:31 +0100
From:      Martin Ward <Martin.Ward@durham.ac.uk>
To:        fuzz@ldc.upenn.edu
Cc:        freebsd-questions@freebsd.org
Subject:   Re: TCP port 993 hijacked by mountd, rpc.statd
Message-ID:  <200508221249.31288.Martin.Ward@durham.ac.uk>

next in thread | raw e-mail | index | archive | help

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
MOUNTD_PORT=4002

# Set fixed port for statd
STATD_PORT=4000

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:

LOCKD_TCPPORT=4001
LOCKD_UDPPORT=4001

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

-- 
			Martin

Martin.Ward@durham.ac.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508221249.31288.Martin.Ward>