Communication between more than 2 computers can be use with TCP/IP protocol. This is a standard network protocol. The computers have to know each other using IP address. Ok let's say the computer already connected, to continue with communication, they have to know which ports are open and ready to use. The open port number is vary depend on what kind of service do they want to communicated. For example, standard FTP Server port is 21, but this port can be change to any number.
With the sample above, the computer which is already installed with FTP Server can be connected using port 21. We can try to connect to that computer using telnet at command prompt:
> telnet ftpserverip 21
If the result is Could not open connection......, it mean the port 21 is closed. That is the simple way to check the open port with telnet at command prompt.
Becareful when our computer connect with internet connection. Some virus usually also infected the computer by using unstandard port. When they infected the computer, they also open some port at the infected computers. After that they will try to hijack or remote the computer from other location. Port also can be open without permission when we installed unknown software.
How to know what port are open?
The easy way to know what ports which is open at our computer by using NETSTAT at command prompt:
> netstat -an
it will show all open ports, the result will be: Local Address, Foreign Address and State. The Local Address are the open ports at our computer. The Foreign Address are the open ports at other computer who connected with us. The State can be “LISTENING” or “ESTABLISHED”, LISTENING mean the port ready to connect. Established mean they are at connected process now.
We also can check our open ports with online services. You can try use http://www.auditmypc.com/firewall-test.asp. Follow the instruction, then they can check you open port from their computer. I think this is good, because the results are the real conditions where any computer can connect to that ports. Because when we use netstat, maybe your ISP block that special port, so even netstat said open, but we still can not access to that port from internet. That's why we can try using online services help.