Step 1) Choose Start→Control Panel. Click the System and Security link and then click Windows Firewall.
You see the main Windows Firewall control window.
Step 2) On the left, click the Advanced Settings link.
Step 3) On the left, click Inbound Rules. Then, on the right, under Actions, click the New Rule link.
Windows Firewall shows you the New Inbound Rule Wizard.
Step 4) Select the option marked Port and click Next.
The wizard asks you to specify which ports.
Step 5) In the Specific Local Ports box, type the ports you want to open, separated by commas, and then click Next.
For example, in this case, the TCP ports that need to be opened are 8081, 8082, 9001, and 9002. The wizard takes action and opens those ports to receive data.
Step 6) Choose Allow the Connection and click Next.
The New Inbound Rule Wizard wants to know whether it should apply this rule if you’re connected to a domain network, a private network, or a public network. The safest option is to make it only open on your home network.
Step 7)Check the boxes for Private or any other desired network type, and then click Next.
The wizard asks that you give the rule a name and, optionally, a description.
Step 8) Type a name (usually the name of whatever program required the opening). Click Finish
Your new rule appears in the Inbound Rules list. It takes effect immediately.