closing a TCP/UDP port

From: SC (sc.service3_at_comcast.net)
Date: 09/07/05


Date: Wed, 7 Sep 2005 11:10:39 -0500

Is there any shell command or GUI utility to close a TCP/UDP port on
detection?

Once I detect that an unwanted TCP/UDP port is open (e.g. by using NETSTAT)
I would like to force it to close instantly... is there any way to
accomplish this?

thankx

SC