close Port 445:

  • Click Start >> Run, to open the Run dialog box
  • Here, type regedit to open the registry.
  • Navigate to the following registry key – HKEY_LOCAL_MACHINE >> System >> CurrentControlSet >> Services >> NetBT >> Parameters
  • On the right-hand pane find the option TransportBindName.
  • Double
    click
    on
    TransportBindName and delete the existing default value.

  • click
    Ok

From the above, it is clear, that you have closed Port 445 by giving a blank value to TransportBindName for NetBT services.

close Port 135:

  • Click Start >> Run, to open the Run dialog box
  • Here, type regedit to open the registry
  • Navigate to the following registry key – HKEY_LOCAL_MACHINE >> software >> microsoft >> Ole
  • On thee right hand window pane find an option called EnableDCOM
  • Double-click EnableDCOM and change the value from Y to N
  • click Ok
  • Close the Registry Editor and restart your computer

These steps will only work for a standalone servers. Any serveres that are in a cluster state such as Active Directory, SQL failover cluster, Network Load Balancing [NLB] or Windows Replication service that NEVER-EVER follow these steps as it will simply diable port 135 which is used my Distributed File System [DFS] for the servers to comunicate with each other. Disabling it will just wont allow the servers to communicate and the services will fail.