Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Dec 1998 23:26:00 +0000
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        Fadi Sodah <sodah@qatar.net.qa>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: OpenPorts
Message-ID:  <19981225232600.A18472@scientia.demon.co.uk>
In-Reply-To: <3683AC0C.E7D22DF9@qatar.net.qa>
References:  <3683AC0C.E7D22DF9@qatar.net.qa>

next in thread | previous in thread | raw e-mail | index | archive | help
Fadi Sodah wrote:

> How can I close the open ports
> 
> Port Number  Protocol  Service
> 25           tcp        smtp
> 515          tcp        printer
> 
> in  inetd.conf i did not find anything related to them!

Kill the process which has them open, if you don't want them open. lsof
would help here (sysutils/lsof in the ports tree.) Run this as root:

# lsof -i | grep smtp
exim      18445 exim    0u  inet 0xf3f83720      0t0  TCP *:smtp (LISTEN)

This shows that Exim, running as pid 18445, has the smtp port open. (You
probably don't need lsof for this; sendmail probably has smtp open, lpd
probably has printer open. Use ps and grep to find their pids.)

These aren't listed in inetd.conf because sendmail and lpd are daemons
in themselves, and do not run from inetd.conf.

-- 
Ben Smithurst
ben@scientia.demon.co.uk

send a blank message to ben+pgp@scientia.demon.co.uk for PGP key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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