Re: Need help blocking all ports except a few
Patrick Lesslie wrote:
On Thu, Dec 25, 2003 at 04:17:09PM +0100, Sommarnatt wrote:
I checked my ports with netstat -tulp but how do I stop those services?
In inetd.conf there's only smtp and identd externally. I commented out smtp (it
didnt relay anyway but it's not needed).
This is my output from netstat -tulp:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:printer *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:time *:* LISTEN
tcp 0 0 *:daytime *:* LISTEN
tcp 0 0 *:discard *:* LISTEN
tcp 0 0 *:1024 *:* LISTEN
tcp 0 0 *:111 *:* LISTEN
udp 0 0 *:discard *:*
udp 0 0 *:1024 *:*
udp 0 0 *:moira_ureg *:*
udp 0 0 *:111 *:*
udp 0 0 *:bootpc *:*
This looks fairly clean to me (but please someone correct me, I was
caught out recently!).
You can stop inetd altogether, and lpd, portmap and dhclient - in fact
most of these things by experimentally removing links from /etc/rc2.d/
and possibly also from /etc/rcS.d/
Could you also stop services by simply changing the permissions of the
scripts in /ett/init.d/ ?
Promoting Linux and BSD for desktop use in e-commerce