To block certain posts of your server we have to write custom inbound and outbound rules. The following steps show how to do this.
1) Open the Windows Firewall MMC (Click on Start and then Control Panel and then Administrative Tools and then select Windows Firewall with Advanced Security).
2) Click on the Outbound Rules node in the node pane.
3) In the Actions pane, click the New Rule link.
4) On the Rule Type page of the New Outbound Rule Wizard, select Port to create a rule based on the port, and click Next to continue.
5) On the Protocol and Ports page, select TCP and enter 8787 in the Specific Local Ports field. Click Next to continue.
6) On the Action page, select Allow to enable the connection.
NOTE: The Action page of the New Outbound Rule Wizard also allows for a rule to be configured that only allows the connection if it is secured using IPSec technologies.
7) On the Profile page, select all three check boxes. This allows an administrator to specify that a rule only applies when connected to specific networks. Click Next to continue.
8) Enter a descriptive name for the rule, and click Finish.
Review the rule settings in the Outbound Rules node. This allows for a quick-glance view of the rule settings. You can also include a rule in a rule group, which allows for multiple rules to be tied together for easy on/off application.
The same steps can be followed to create inbound rules to the server.