Getting MSMQ messages out of Windows Server 2008 remotely
I'm now into full swing looking at MSMQ 4.0 on Windows Server 2008 using Virtual Server. I haven't got round to installing 2008 on my 64-bit laptop and desktop yet but maybe in the summer sometime when customers are on vacation I'll have the time.
Sending messages works fine but receiving them fails (0xC00E0069 Remote Machine Not Available). After a little while I realise that the security is tighter than I'm used to so the Windows Firewall must be blocking me. I check the Exceptions list for Windows Firewall (Control Panel) and Message Queuing is there.
This doesn't provide me with much detail, though, so I have a look at Server Manager where I can see two entries.
Checking the properties, I see that these are:
- TCP - all ports - for %systemroot%\system32\mqsvc.exe
- UDP - all ports - for %systemroot%\system32\mqsvc.exe
so basically the firewall will allow any incoming traffic to the ports that MSMQ is listening on. This is OK for sending messages to the server but not for receiving them as that uses RPC and the End Point Mapper (EPM). Luckily, in the list of Inbound Rules is "Remote Administration (RPC-EPMAP)". Enabling this exception allows my application to query the EPM and so determine the port MSMQ is listening on for remote receive requests. There's no need to add any other ports as the first two exceptions have those covered already.
Now all my messages can be pulled out of their queues remotely.
For more information on ports required by MSMQ, check here.
Comments
Anonymous
February 04, 2009
Very interesting. From a network perspective, specific ports have to be opened up (default is to close all ports and open only necessary ones). It used to be, with MSMQ 3.0, that a variety of ports had to be opened. Any thoughts on which ones are REQUIRED, ie via port sniffer or scanner, for MSMQ 4.0? thanks BrianAnonymous
February 04, 2009
Hi Brian. Easily answered: http://blogs.msdn.com/johnbreakwell/archive/2008/04/29/clear-the-way-msmq-coming-through.aspx Nothing has changed on the wire for MSMQ 4.0. Cheers, John Breakwell (MSFT)