DCOM Access Issues through Windows Server 2008 Firewall

windows-firewallwindows-server-2008wmi

I am trying to connect remotely to a Windows Server 2008 Machine through WMI Protocol using J-Interop Library. Although I have not been able to configure the firewall properly even after following quite a few online guides. I get the "The RPC Server is not available." error every single time.

I have added following exceptions to my firewall already and believe that these should be enough for the communication to go through, but no success –

  1. COM+ Access
  2. Remote Administration
  3. WMI Access

On the other hand, whenever I turn the firewall off, my code works fine and the communication works perfectly, so I am pretty confident that its only a firewall configuration issue. I can add my code to this post if required and any other information that might be needed for troubleshooting this issue.

Best Answer

RPC generally uses port 135 and a random port above 1024. Here is an article from Microsoft on setting some RPC services to use a specific port(s).

Also, DCOM will not work through NAT, since the actual client and server IP addresses are a part of the handshake.