If you are using the Avast Internet Security product, go to Settings > Active Protection > Firewall > Packet Rules and click on ADD. Type the settings you want in the highlighted box / line at the bottom of the list. Make sure the new rule has a check mark to the left (this means it is active) and click OK(s) back to the main screen.