SNMP Extension Fails on Windows 8/Server 2012 when attempting network communication

Article ID: 2771908 - View products that this article applies to.
Expand all | Collapse all

Symptoms

Any SNMP Extension agent that attempts to perform any UDP or TCP network communication on Windows Server 2012 or Windows 8 will fail. The socket connect() request will fail with the following NT status code: 

0xC0000022 = STATUS_ACCESS_DENIED
{Access Denied}
A process has requested access to an object, but has not been granted those access rights.

Cause

Windows 8/Server 2012 implements "Windows Service Hardening" (WSH) rules on the SNMP.EXE process that prevent all network communication except: UDP Out over Remote Port 161, or UDP In over Local Port 161. If a partner SNMP Extension DLL tries to perform UDP or TCP communication, even to the loopback address, the communication will be rejected by the WSH rule.

Resolution

The partner must implement their own Windows Service Hardening (WSH) rules to allow their SNMP extension to perform the UDP or TCP communication it requires -- even for loopback communication. For example, if the SNMP extension performs TCP traffic over local port 3333, the following rules must be added:

1. An outbound rule for TCP remote port 3333
2. An inbound rule for TCP local port 3333

This is accomplished by running a program in privileged mode that adds these two rules using the INetFwRule interface (API) by setting the properties using the put_ methods, and then by calling "hr = pFwRules->Add(pFwRule); " .

The loopback address should not be specified in put_localaddresses or put_remoteaddresses -- this is not recommended or supported. Instead, to block incoming TCP connectivity to local port 3333, configure a rule using Windows Firewall with Advanced Security, netsh or the Firewall Control Panel to block incoming connection requests. Unlike WSH, rules created using these tools have no effect on loopback communication.

More information


The INetFwRule interface documentation can be found in MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365344(v=vs.85).aspx


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2771908 - Last Review: October 22, 2012 - Revision: 1.0
Applies to
  • Windows 8
  • Windows 8 Enterprise
  • Windows 8 Pro
  • Windows Server 2012 Standard
  • Windows Server 2012 Datacenter
Keywords: 
KB2771908

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com