Netstat is a very useful application that I use frequently for finding listening ports. On occasion I'll find something that is consuming a wide range of listening ports. For example, I've seen time and time again where Microsoft's DNS server, if not properly setup, consuming all UDP listening ports. Here's a tip to find out what application is occupying what listening port(s).
Open command prompt or terminal window and type the following,
netstat -h
This will list all available options for netstat. Older versions of netstat on Windows machine will not include all options mentioned in this article. I usually use options -an, example,
netstat -an
This will list all ports, listening or not, and what interface the port is bound to. When you run netstat -an you may see UDP listening ports scroll off the screen. To find out what application is using these ports type the following (windows computer),
netstat -anb
The -b option will also list the applications responsible for opening the listening port and hopefully help in your troubleshooting efforts. In my example of Microsoft's DNS Server I typically ask if the DNS server is being used and if not stop the service and set it to disabled, this immediately clears all listening UDP ports by application dns.exe.
Upcoming DNS2Go Webinar
4 days ago
