Skip to content

Instantly share code, notes, and snippets.

@roozbehk
Created April 17, 2015 19:49
Show Gist options
  • Save roozbehk/37d169026eda98018853 to your computer and use it in GitHub Desktop.
Save roozbehk/37d169026eda98018853 to your computer and use it in GitHub Desktop.
Windows Firewall Check Firewall Port
Since you are on the Windows machine, these things can be done,
Execute the following command and look for a ":3306" 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.
There is one more command to check the firewall state
(Update for Windows 7 users -- as referred by Nick below -- use netsh advfirewall firewall)
netsh firewall show state
this will list the blocked ports as well as active listening ports with application associations
This command will dump the Windows firewall configuration detail
netsh firewall show config
C:\Windows\System32>netstat -an |find "3306"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment