Go to windows firewall and select advanced settings. A new window will be opened as shown below.
First select the inbound rules and enter new rule. In that check mark the port number as shown below.
Select the protocol as TCP or UDP and enter the port number to be allowed.
Select allow the connection as shown in the fig. then select next don’t change anything in that window and proceed with next. Finally give name of the rule any description for the process allowed and service .The port number and services are successfully allowed.
In Same way we can block any particular port using Inbound and Outbound Rules in windows firewall.