Port 161: SNMP

Port 161 (UDP) is used by SNMP. Simple Network Management Protocol polling of routers, switches and printers. Use SNMPv3; v1/v2c community strings are plain text.

161Port
UDPProtocol
snmpIANA service name
Network infrastructureCategory

Port range

161 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

Port 161 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 161 in a firewall

ufw         sudo ufw allow 161/udp
iptables    sudo iptables -A INPUT -p udp --dport 161 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=161/udp
Windows     New-NetFirewallRule -DisplayName "SNMP 161" -Direction Inbound -Protocol UDP -LocalPort 161 -Action Allow

Check if port 161 is open

nc -vzu example.com 161   # UDP checks are unreliable: no reply ≠ closed
sudo ss -tulpn | grep ':161 '   # what is listening locally (Linux)

Other network infrastructure ports

Frequently asked questions

What is port 161 used for?
SNMP. Simple Network Management Protocol polling of routers, switches and printers. Use SNMPv3; v1/v2c community strings are plain text.
Is port 161 TCP or UDP?
UDP.