In Windows Vista, click Start> Control Panel > Security> Windows Firewall > Change Settings.
(Make sure you are not viewing the Control Panel in Classic View).
In Windows7, click Start > Control Panel >System & Security> Windows Firewall >Advanced settings>inbound rules>new rule>ports>specific local ports>Allow the connection>next.
In Windows XP, click Start> Control Panel > Security Center > Windows Firewall.
Open the Control Panel from the Start Menu and switch to Classic View by clicking the link in the top left corner of the Window.
In Classic View locate and click the icon marked Windows Firewall.
Click the tab marked Exceptions then click the button marked Add a Port.
Type a simple name into the box marked Name.
Type the number of the port you wish to open into the box marked Port Number.
Choose either TCP or UDP and click the button marked OK.
Repeat this process for every port that you wish to open.
Most firewalls allow you to unblock programs via their security alerts and the Windows Firewall in XP/Vista/7 is no exception.
When the firewall detects Internet -based activity from a certain program, it will notify you and ask if you want to allow or deny this activity.