use netstat
eg: netstat -l -p tcp (shows listening ports)
Show ports listenig for incoming connections:
netstat -na | grep LIST
Show current connections:
netstat -na | grep ESTA