I have come across situations where it was necessary to check the ports before even installing an application to see if firewall is open or if no other application is already using the port.
Linux:
On Linux environments this can be done using command ln:
Use yum or zypper or apt-get to install the tool:
Now simulate your port and test:
Windows:
On windows I did not find a ready-made way to do the same. So designed my own, with some help from internet.
No installation required and it is version independent. Just download and run it from below link:
Instructions:
Unzip the file to your desktop.
Double click to execute the file:
If prompted allow firewall access.
And you are ready to test.
Once you are connected, you get a message in your simulator:
Note: After the test is done end the test process from your task manager. Otherwise the port will be kept occupied.