Cygwin - Configure Windows Firewall

Written: 08/15/12

Last Updated: 06/15/13

This guide is the sixth part of my Cygwin SSH server series and assumes that the first five guides have already been completed. If you have not yet completed those articles, click here to go to the first article. That being said, the content displayed here is not Cygwin specific. This article discusses how to open a port in Windows Firewall. If you do not open the port then your users will be unable to connect to you. In addition to opening the port in the firewall, you will also need to forward the port on your router (assuming you are connected to a router).

Begin by clicking on the start menu and typing “firewall”. Click on “Windows Firewall with Advanced Security”.


In the window that appears on the left hand-side, in the section titled “Windows Firewall with Advanced Security”, click on “Inbound Rules”.


On the right hand-side under “Actions” and “Inbound Rules”, click on “New Rule…”.


The inbound rule wizard should now appear. This tool will allow you to open the port to the external world. That being said, you should make sure you have good security in place, as all connections coming through this port will be allowed. In reality, this should not be an issue, as the only program listening to the port you chose should be sshd, and as such it will handle the connections appropriately.

Select “Port” and then click on “Next >”.


Select “TCP” and “Specific local ports:”. In the “Specific local ports:” field, type in the port you chose previously during part 3 of this series. If you have been following through my guides, verbatim, the port number to use is “8895”. When you’re ready to continue, click “Next >”.


Click on “Allow the connection” and then click on “Next >”.


Check all of the boxes to allow the connection for all domains and then click “Next >”.


For the name, give it something meaningful, such as the name of this service – “sshd” – feel free to also include a description to help you remember what this rule was for. Click “Finish” to open the port.


This concludes the sixth part of my Cygwin SSH server series. The next part, covers how to enable server logging through the use of syslog. Click here to go to that article.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.