TCP port 993 hijacked by mountd, rpc.statd

Martin Ward Martin.Ward at durham.ac.uk
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
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 at 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/


More information about the freebsd-questions mailing list