How to check which ports are open?
How to check the ports that a particular application is
using?
Questions that will pop up when things go wrong, when an
application does not work as expected.
When replication does not work, or access denied error
occurs.
Or when an error occurs that states, a particular port is in use. Like, Port 80 is in use.
Of course the error, just gives an idea that a port is in use by another application or program but does not explicitly tells that which specific application or program is using the port.
This is where troubleshooting is necessary. An example below is given.
One scenario that I can think of is when setting up Active
Directory replication; whether in the real world, or in a test lab environment.
Or even simply a port forwarding
scenario on web hosting, CCTV installation or other setup, if it doesn’t work would require
troubleshooting or to check whether ports are open, ports are listening or not.
Netstat command in Windows is a
good start to check or start troubleshooting and using Netstat
parameters, will
be able to check ports that are open and which application is using the port.
There is also one good tool
provided by Sysinternals, called TCPView that provides comprehensive output on
ports troubleshooting.
Nmap is also a good tool, which
has been a familiar tool on the Linux world.
But Nmap got a package for
Windows operating system also.
Typing “netstat /?” in Windows
command prompt will show the available parameters for netstat.
Typing “netstat –ano”, (don’t include
quotes when typing on the command prompt). This will show the protocol being
used by the port and also the PID (process ID number) of the application that
is using the port.
Task Manager can be sued to view
the PID or process id number.
Or if you are using Windows 7 or
above OS version, PowerShell can easily check the process ID or PID number.
Open PowerShell ISE and type get-process
–id “PID” number that you want to query.
Example below shows that the “netstat”
output has a PID number of 3836 and the connection is established using TCP
protocol. Port being used is 49316 and 40003
C:\Windows\System32>netstat
-ano
Active Connections
Proto Local Address Foreign Address
TCP 192.168.1.8:49316 192.168.74.24:40003
State PID
ESTABLISHED 3836
And the PID number can be viewed using PowerShell, to check which
application is using the particular PID number.
Get-process -id "3836"
Example output:
Handles NPM(K)
PM(K) WS(K) VM(M) CPU(s)
------- ------ ----- ----- ----- ------
1289 147 189248
199684 549 1, 414.26
Id ProcessName
-- -----------
3836 Skype
3836 Skype
Above example, is checking from
inside the local network. But if your application goes outside the local network
or need WAN connectivity. Then a different approach of checking the ports
whether they are open or not.
And for WAN connectivity to open
ports will involve configuring router, firewall or other setup and solely
depends on the network infrastructure. You can search the web for “Port Forwarding
Configuration”, but don’t open ports for the sake of opening ports without any
reason or just for fun.
Make sure you know exactly what
you are doing, open ports on your system are great, great opportunity for
others to manipulate and abused your system.
Dyn website provide a very good
tool to check open or closed ports:
To use this tool need to have a
Dyn account.
Well, these are just network
basic stuff and hope it helps someone.
Cheers!!!
====================================
Android Divine Mercy Chaplet Guide
https://play.google.com/store/apps/details?id=com.dmercyapp
====================================
Android Divine Mercy Chaplet Guide
https://play.google.com/store/apps/details?id=com.dmercyapp
Heaven's Dew Fall
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Android Catholic Rosary App - Guide
https://play.google.com/store/apps/details?id=com.myrosaryapp&hl=en-GB
Educational App for Android Kids:
Free Version:
https://play.google.com/store/apps/details?id=com.xmultiplication
Paid Version:
https://play.google.com/store/apps/details?id=com.letsmultiply
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Android Catholic Rosary App - Guide
https://play.google.com/store/apps/details?id=com.myrosaryapp&hl=en-GB
Educational App for Android Kids:
Free Version:
https://play.google.com/store/apps/details?id=com.xmultiplication
Paid Version:
https://play.google.com/store/apps/details?id=com.letsmultiply
Comments
Post a Comment