162Port
UDPProtocol
snmptrapIANA service nameNetwork infrastructureCategory
Port range
162 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.
Security
Only open port 162 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.
Open port 162 in a firewall
ufw sudo ufw allow 162/udp iptables sudo iptables -A INPUT -p udp --dport 162 -j ACCEPT firewalld sudo firewall-cmd --permanent --add-port=162/udp Windows New-NetFirewallRule -DisplayName "SNMP trap 162" -Direction Inbound -Protocol UDP -LocalPort 162 -Action Allow
Check if port 162 is open
nc -vzu example.com 162 # UDP checks are unreliable: no reply ≠ closed sudo ss -tulpn | grep ':162 ' # what is listening locally (Linux)