1. On the server itself, use "netstat -an" to check to see which ports are listening
2. From outside, just "telnet host port" to see if the connection is refused, accepted, or timeouts
When using the second way:
• If connection refused then there is nothing running
• If connection is accepted then port is listening
• If connection timeout means then firewall is blocking access
In Windows OS,
• Execute the following command and look for a ":1521" listener (you did not mention UDP/TCP). This will confirm there is something running on the port.
netstat -a -n
• After this, if you are expecting incoming connections on this port and feel that the firewall may be blocking them, you could start windows firewall logging and check the logs for dropped connections
○ Go to the Windows Firewall, Advanced settings
○ Click on the Settings button next to "Local Area Connection"
○ Select "Log dropped packets"
○ Look at the log file location (if not present define one)
○ Click OK
○ Now, when the connection attempt is made (assuming you know when this is done), look at the log file for a drop on port 3306.
○ If this is seen, you will want to add an exception for this port.
• This command will dump the Windows firewall configuration detail
netsh firewall show config
Few more commands for communicating between hosts and identify ports,
To Turn Off the Firewall
Netsh advfirewall set allprofiles state off
To Turn On the firewall
Netsh advfirewall set allprofiles state on
To Check Firewall status
Netsh advfirewall show
To Ping your machine from your machine
Ping localhost
To find whether a port is open or not in a host machine
Telnet
To get the complete IP Address related details of a machine
IPCONFIG /ALL
To identify what Ports are listening in your machine, from your machine command prompt type the following
netstat -a -n
http://www.canyouseeme.org/ This site will tell you whether port is open or not, but it will look for your domain IP Address, if you are in a Domain or Intranet connected machine then this site is not useful. If you are working on your laptop in your home or in ur private isp then this will be useful
If none of this work then make sure that your machine/laptop is having a static IP address and you should either add port to Firewall Open Ports of Switch off the firewall).
No comments:
Post a Comment