How to find the port which is trying to connect?
-
28-04-2021 - |
Pregunta
we are having lab machines behind firewall. We used to ask our IT team to open the ports which are required.
We are memorizing port numbers for each application and ask them to unblock. It is really tough.
When we execute the application, is it possible to find which port number it is trying to access?
Solución
My favorite little program that will help you is TCPVIEW.exe (Sysinternals):
http://technet.microsoft.com/en-us/sysinternals/bb897437
If you run this on your server you'll see what ports are listening. If you run it on the client you'll what connections are being made and the ports they're connecting to.
Otros consejos
If you don't want using an external program you can use this DOS command:
netstat -b -a
here http://poshcode.org/560 you can find a "objectized" NETSTAT.EXE function for Powershell