Ports can be classified as either open or closed. Open ports are those where an application service is actively listening for new connection requests. Closed ports are those which are not currently being used. You can use the netstat command in Windows to view active TCP and UDP connections. netstat command is also available on Linux based systems such as Ubuntu and RedHat.