Every networked application requires a port to communicate from within the Operating System. Open or otherwise unknown ports are the bane to security conscious individuals and why products that help keep port access restricted – like a firewall – are necessary.
An open port can only be used by a single application or process. Therefor it’s certainly possible that a port conflict can arise, which is especially the case for any application that accepts incoming network connections. If your computer is running a web server then port 80 is in use by whatever application is serving the web content. A future application that would then request or require port 80 would fail.
While port 80 is rather well known to the individuals this matters most to, that’s not to say every port is common knowledge. So what do you do if you have a port conflict on a number you are otherwise unaware of? Addressing the situation requires first identifying the existing application that has control over the desired port.
Launch a Command Prompt with Administrative rights through Windows Start->Search menu.
Image may be NSFW.
Clik here to view.
Execute the command netstat -aon | more. By passing the more modifier you can space through the returned results a page at a time; extremely helpful when it pertains to something like netstat. Netstat will list all the running programs or processes that have active network connections – you can see things such as the local port or the remote address or, most importantly, the process id or pid.
Image may be NSFW.
Clik here to view.
Here you can see that PID 2464 has two open ports on the computer: 5800 and 5900. But what application is PID 2464?
Launch Windows Task Manager with a right-click on the taskbar and selecting Start Task Manager. Navigate to the Processes tab – you’ll notice that there isn’t any PID column by default, so we’ll need to enable that via View-> Select Columns.
With all the PIDs displayed scroll through the listings and locate 2464 that we identified above. It ends up belonging to the winvnc.exe application.
Image may be NSFW.
Clik here to view.
Now, VNC is probably something you would recognize at this point as it’s likely something you’ve installed. However, if the process name doesn’t ring any bells you can browse to it’s location on the hard disk via a right-click.
Image may be NSFW.
Clik here to view.
Typically this is now enough information to identify which application is bound to an offending port; if not, with the process name a quick Internet search will likely return the answer.