I`m presuming it is a legit version of the os you have and a licence key.
It may be windows firewall, or windows security center of windows causing the problem.
If you have any other software that is installed on your system for antivirus and firewall protection.
Make sure the firewall part is not running at the same time as windows firewall or the one provided in windows security center.
If using windows 7,8, or 8.1.