sudo ipfw add 1 deny tcp from any to any portnumber out
sudo ipfw add 2 deny udp from any to any portnumber out

Example:

sudo ipfw add 1 deny tcp from any to any 137 out
sudo ipfw add 2 deny udp from any to any 137 out