Port 161-162: SNMP (Simple Network Management Protocol)
What port 161-162 (UDP) does, the security risks of leaving it open, and how to secure and test it.
| Port | 161-162 |
|---|---|
| Transport | UDP |
| Service | Simple Network Management Protocol (SNMP) |
| Encrypted | Only in SNMPv3 |
What is port 161-162?
SNMP lets monitoring systems read status from network devices on UDP 161. Devices send alerts (traps) to the monitoring server on UDP 162.
Common uses
- Monitoring bandwidth, CPU and interface status on switches, routers and printers
- Receiving alerts when links go down
Security risks
- Default community strings such as "public" and "private" give attackers read or even write access
- SNMPv1 and v2c send everything, including the community string, in plain text
- Abused for DDoS amplification
How to secure port 161-162
- Use SNMPv3 with authentication and encryption (authPriv)
- Change or remove default community strings
- Use access lists so only the monitoring server can query devices
- Never expose SNMP to the internet
How to check if port 161 is open
| Where | Command |
|---|---|
| Scan from another machine | nmap -sU -p 161 <host> |
| Linux (what is listening) | sudo ss -tulpn | grep :161 |
| Windows (what is listening) | netstat -ano | findstr :161 |
Only scan systems you own or have permission to test.
Example: block it at the internet edge (Cisco)
For a service that should stay inside your network, deny it on the internet-facing interface. Put the rule before any broader permit statements:
ip access-list extended INTERNET-IN
remark Block SNMP from the internet
deny udp any any eq 161
permit ip any any
!
interface GigabitEthernet0/0
ip access-group INTERNET-IN inIn a real network the final line would be your normal inbound policy, not "permit ip any any". Build and check rules with the ACL builder.
Related ports
Frequently asked questions
What is port 161-162 used for?
Port 161-162 (UDP) is used by Simple Network Management Protocol (SNMP). SNMP lets monitoring systems read status from network devices on UDP 161.
Is it safe to open port 161-162?
Only if the service needs to be reached and is configured securely. Use SNMPv3 with authentication and encryption (authPriv).
How do I check if port 161-162 is open?
From another computer, run nmap -p 161 followed by the host address with -sU for UDP. On the server itself, ss -tulpn on Linux or netstat -ano on Windows shows whether anything is listening on 161.
Learn more: TCP, UDP and ports explained and firewall basics.