You can find which ports you are using with specific programs on a computer by examining the computer's in-use ports through the Command Prompt interface. Identifying which ports a program is using is helpful when trying to allow or restrict that particular program's access across a network. If you know the port a program is using, you can make certain that program is blocked or not blocked by any other computer or gateway on the path to its destination, like another computer or the Internet.
Open the Command Prompt window by clicking on the "Start Menu," entering "Command" into the "Search Bar" and pressing "Enter."
Video of the Day
Type "Netstat -ano" into the new window and press "Enter" to bring up a list of all ports currently in use.
Identify what program or programs are using a particular port from the "PID," or "Port ID," list by typing "tasklist /svc /FI "PID eq 'PID#'" and pressing "Enter." Enter the PID number in the PID# spot, excluding the quotation marks.
Look under "Image Name" to identify the program or programs that are using the port and look under "Services" to determine what actions the corresponding programs are using through the port.
Repeat the process from Step 3 for each Port ID until you have found the port that you are using with a particular program.
It might seem like you will have to check a large number of ports at first because the computer lists each instance of a port in use. However, many of the ports are being used by multiple services and you only need to check each port once. The actual number of ports in use for an individual computer is often around two dozen.
Some routers and firewalls have the ability to bring up a list of all programs that have used the Internet and local network. If your router or firewall has this feature, you can identify the port must faster than through Command Prompt. However, the Command Prompt method works the same on all Windows XP, Vista and Windows 7 computers, whereas the checking through the firewall and router varies from program to program and router to router.