A firewall is a system designed to prevent unauthorized access to or from a private network, so, if we meant to use the SNMP windows service to communicate our PC with another PC and there's a firewall active on it, we must be sure of setting this firewall to allow the SNMP communication by opening the UDP port 162 (the default used port).
1. Click on the Start menu and open the Control Panel
2. Go to System and Security > Windows Firewall
3. In the Windows Firewall panel click the "Allow a program or feature through Windows Firewall" button
4. Allow the SNMP Service to communicate through the domain, private and public networks
5. Back in the Windows Firewall panel click the "Advanced settings" button
6. In the left panel click Outbound Rules, and then in the right panel click "New Rule" option
7. In the New Outbound Rule wizard, select "Port > UDP > Specific local ports (162) > Allow the connection > Domain, private and public > Name (VPN_UDP_162)"
8. Click Finish and close the Windows Firewall panel.
NB: The outbound port 162 allows the computer to apply SNMP traps to the SNMP monitoring server.