[[receive-snmp-traps]]
= Receive SNMP traps/informs
:description: Learn about how to configure a policy that lets OpenNMS {page-component-title} bind to the ICMP service with SELinux enabled on your OpenNMS server.

{page-component-title} lets you receive and process SNMP traps and informs out of the box.
The {page-component-title} services run as an unprivileged user and cannot bind on port numbers below `1024` without escalated privileges.
For this reason, the default port for the SNMP trap/inform listener is set to `10162/udp` instead of the IANA registered port number `162/udp`.
The following example shows how to configure the local firewall daemon to forward port `162/udp` to `10162/udp`.

NOTE: If you need the SNMP trap listener on port `162/udp` directly, see xref:deployment:core/install.adoc#set-up-core-instance[Binding to privileged ports].

[{tabs}]
====
CentOS/RHEL 7/8/9::
+
--
include::firewall/centos-rhel/firewall-core.adoc[]
--
ifeval::["{page-component-title}" == "Horizon"]

Debian/Ubuntu::
+
--
include::firewall/debian-ubuntu/firewall-core.adoc[]
--
endif::[]
====

You can verify your firewall and port forwarding configuration by sending an SNMP trap from a remote system to your {page-component-title} instance:

[source, console]
snmptrap -v 2c -c public opennms-core-host '' 1.3.6.1.4.1.2021.991.17 .1.3.6.1.2.1.1.6.0 s "Milky Way" <1><2>

<1> By default, {page-component-title} uses the `public` community string.
If you changed the community string in {page-component-title}, use the updated name here.
<2> Replace `opennms-core-host` with your {page-component-title} instance's IP or FQDN.

NOTE: On RHEL and CentOS, the `snmptrap` command line tool is part of the `net-snmp-utils`.
If you run on Debian or Ubuntu, the tool is part of the `snmp-utils` package.

To verify your configuration, look for an SNMP trap event in the {page-component-title} web UI:

. Sign in to the web UI.
. Click menu:Monitoring[Events].
. Click *Advanced Search*.
. Under *Exact Event UEI*, enter `uei.opennms.org/generic/traps/EnterpriseDefault`. You can also specify *TCP/IP Address Like* or *Node Label Contains* to further narrow your search.
