161/UDPSNMP
Network services · Well-known port · OSI layer 7
A monitoring system such as Zabbix queries device and server metrics.
IANA: officially registered as snmp
You decide which services we may enable for analytics, personalization, and external content.
We use cookies and similar technologies on our website to personalize content, embed external media, and better understand how individual areas are used.
Necessary cookies
These entries support essential functions such as security, stability, and form processing.
Optional sections
Your data may be processed with your consent or on the basis of legitimate interests. In the cookie settings, you can reject or explicitly allow each optional category.
Some services process personal data in third countries. By consenting, you also agree to this transfer. You can find more information in our Privacy Policy.
You can reopen and change your selection at any time. · 1.0.2
Port 161 is the default port for the Simple Network Management Protocol (SNMP) over UDP. This tool shows you the port details and generates firewall commands to restrict access to your monitoring server.
Built by Justin Schuessler
Try the commands on your own VPS, with root access and your own firewall.
Add multiple ports one at a time, up to 12.
Network services · Well-known port · OSI layer 7
A monitoring system such as Zabbix queries device and server metrics.
IANA: officially registered as snmp
Firewall commands
Open port
sudo ufw allow 161/udpFor Ubuntu and Debian. ufw creates the rule for both IPv4 and IPv6. If ufw is disabled, allow SSH first (sudo ufw allow 22/tcp), then enable it with sudo ufw enable, or you'll lock yourself out.
On a ZAP-Hosting VPS with an active network firewall, you also need to allow the port in the Customer Panel.
Port 161 explained
A monitoring system uses port 161 to query switches, routers, printers, UPS devices, and servers for values such as bandwidth, CPU load, temperature, and network interface status. An SNMP agent runs on the device and provides the values in a tree of OIDs, described in MIBs. The manager, such as Zabbix, LibreNMS, or PRTG, sends queries to port 161 and receives the responses. If a device reports an event on its own, it uses traps on port 162.
SNMPv1 was standardized in 1990 in RFC 1157 and is still found in many network devices. SNMPv2c introduced more efficient bulk queries, among other changes, but retained community-string authentication. Only SNMPv3, described in RFCs 3411 through 3418, introduced proper authentication and encryption. IANA has assigned port 161 to the “snmp” service and port 162 to the “snmptrap” service.
SNMPv1 and SNMPv2c transmit the community string in plain text, and many devices ship with the “public” community for read access. Anyone who intercepts or guesses that string can read the entire configuration—or even change it if they have a write community string. Use SNMPv3 with authentication and encryption whenever possible. Allow access to port 161 only from your monitoring server's IP, never from the entire Internet. Also check which address the agent listens on in its configuration, such as snmpd.conf.
More ports
These ports are often part of the same setup. Click one to see its explanation and firewall commands.
View all well-known ports and the complete IANA list
Port list source: IANA Service Name and Transport Protocol Port Number Registry, as of October 22, 2026. iana.org
Discover more
Calculate the network address, broadcast address, subnet mask, and usable host range from a CIDR address, and convert between CIDR and IP ranges (IPv4 and IPv6).
Built by Jakub Martyniak
Interactively learn the 7 layers of the OSI model: click layers, assign terms such as switch, ARP, or port 443, and explore animated encapsulation, a quiz, and a cheat sheet for the IHK exam.
Built by Justin Schuessler
Interactively learn the 4 layers of the TCP/IP model (DoD model) according to RFC 1122, with OSI model mapping, animated encapsulation, a port quiz, and a cheat sheet.
Built by Justin Schuessler
Check whether specific ports are open on an IP or hostname—select a protocol or game instead of scanning all ports at once.
Built by Sebastian Rademacher
FAQ
Quick answers about port 161.
By default, SNMP uses UDP on port 161 for queries and port 162 for traps. SNMP over TCP is possible but rarely used in practice. A UDP rule is usually enough for your firewall.
On port 161, the agent on the device listens for and responds to queries from the monitoring system. Port 162 works in the opposite direction: the manager receives traps that a device sends when an event occurs. So you open port 161 on the monitored device and port 162 on the monitoring server.
Allow access only from your monitoring server's IP, for example with sudo ufw allow from 203.0.113.10 to any port 161 proto udp. All other requests will then be dropped. You should also configure which sources may send queries in the SNMP agent itself.
With SNMPv1 and v2c, the community string is the only password, and it travels across the network unencrypted. SNMPv3 supports authenticated users and can also encrypt the data. Unless you're using a fully isolated management network, v3 is the right choice.
Any more questions?
Contact SupportWith a ZAP-Hosting VPS, you have root access, can set up services and firewall rules yourself, and can immediately see which ports are open.
No setup. No risk. Online in seconds.
Looking for more tools? View all network tools