Toolman

What port does SNMP use?

SNMP uses port 161 over UDP.

PortProtocolNameWhat it is for
161UDPSNMPNetwork device monitoring and management.

Exposing it

SNMP v1 and v2c authenticate with a community string sent in clear text, and "public" is still a common default. Use v3, or firewall it to the monitoring host.

Checking it is listening

sudo lsof -i :161          # macOS, Linux
netstat -ano | findstr :161   # Windows
nc -zv host 161               # from elsewhere

An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.

Frequently asked questions

What port does SNMP use?

SNMP uses port 161 over UDP. Network device monitoring and management.

Is port 161 safe to expose to the internet?

SNMP v1 and v2c authenticate with a community string sent in clear text, and "public" is still a common default. Use v3, or firewall it to the monitoring host.

How do I check whether SNMP is listening?

sudo lsof -i :161 on macOS or Linux, netstat -ano | findstr :161 on Windows. From another machine, nc -zv host 161 says whether anything answers.

Other services

Port 161 in full · Every service · All port numbers