By the SNMP Monitoring team · Reviewed July 2026
In SNMPv1 and SNMPv2c, the community string is the shared secret that stands in for a password. It rides along with the request. It is plaintext. If you can sniff UDP 161, you can read it. That's not a theoretical footnote—it's why public still shows up in internet-wide scans.
SNMPv3 replaces this model with users (USM). Until every box you own speaks v3 sanely, you're stuck understanding communities. Parent: What is SNMP. Version context: versions.
What is a community string
Think "network-wide password for SNMP," not a per-user account. The manager includes the community in the message; the agent checks it against configured RO/RW communities (and views, if you bothered to set views).
CLI shape everyone knows:
snmpwalk -v2c -c <RO_string> <host> system
SNMPv2-MIB::sysDescr.0 = STRING: Linux app-01 6.1.0-generic ...
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (360000) 1:00:00.00
The -c flag is the community. No hashing step. No challenge-response. Wrong string → timeouts or authorization failures depending on agent mood and version quirks; don't expect a friendly "password incorrect" banner.
Communities are shared. Rotate one, update every poller. That's operationally annoying, which is why people leave public forever.
Read-only (RO) vs read-write (RW)
| Read-only (RO) | Read-write (RW) | |
|---|---|---|
| Typical default name | public |
private |
| Allows | Gets / walks (per view) | Gets + Sets (per view) |
| Risk if leaked | Recon + data leak | Recon + possible config change |
| Production default? | Random string, never public |
Prefer disabled |
RO is what monitoring needs 99% of the time. RW is how someone flips a setting via SetRequest because the NMS template had write enabled "for completeness." If you don't have a written reason for RW, turn it off.
Views matter: an RO community that can read the entire MIB is still a data leak. Pair RO with a tight VACM view / OID allowlist when you can.
The 'public' / 'private' default problem
Vendors shipped public (RO) and private (RW) as convention for decades. Scripts assume them. Blog posts still paste them. Scanners try them first.
If your agent still answers to public on a reachable interface, assume someone already walked system and is deciding what else to try. This isn't subtle attacker behavior—it's background noise on the internet.
Same for private. Worse. Write access plus cleartext transport is a self-own.
Change defaults on day zero of the host. Not after the audit. How-to for agent config: setup community string.

Why it's insecure
Three stacked problems:
- Cleartext on UDP 161 — any on-path observer can copy the string.
- Shared secret — one leak is every device using that string.
- Coarse auth — it's not mutual auth; it's "knows the word."
No, SNMPv2c does not encrypt the community. People conflate "v2" with "secure." v2c fixed bulk ops and counters; it did not add privacy. See v1/v2c risks and v3 vs v2c.
Also: communities show up in tickets, screenshots, Ansible repos, and monitoring UIs. Treat them like passwords in your secret store—not like a hostname.
Securing community strings
If you must stay on v1/v2c for a while:
- Kill defaults — no
public, noprivate. - Random RO string — long, ugly, generated; not
companyname-ro. - Disable RW unless you have a rare, documented need.
- Source-IP ACL — only pollers talk to 161.
- OID allowlist / VACM view — expose the metrics you need, not the whole tree.
- Management plane only — don't put SNMP on the user-facing NIC if you can avoid it.
- Rotate when people leave or when a string leaks into chat.
- Plan v3 — communities are a bridge, not the destination.
Allowlist guide: OID allowlist. Agent-side community setup: community string setup.
External SNMPv2c pollers should force the same discipline. For example, ostr.io expects a random community plus an OID allowlist for external checks—not a wide-open public. Wiring notes: add SNMP endpoint.
The modern alternative: SNMPv3
SNMPv3 swaps the community model for USM users with auth (and optional priv) plus VACM for who sees which OIDs. You still have secrets—but they're not a single cleartext string in every packet the same way.
When to push v3:
- Path crosses untrusted networks
- Compliance folks can spell "SNMP"
- Device actually implements v3 without falling over
When v2c + hardening is the honest answer:
- Appliance firmware stuck in 2009
- Tooling that only speaks v2c (some external pollers)
- Short migration window with ACLs and allowlists in place
Setup path: SNMPv3. Don't run v3 noAuthNoPriv and call it progress.
How communities show up in real incidents
A few patterns that keep repeating:
- Laptop on Wi-Fi runs a walk with
public"just to see," hits a mis-ACLed agent, dumps half a MIB into a terminal scrollback that later lands in a ticket attachment. - Clone images bake
privateintosnmpd.conf; two hundred VMs later, every guest shares write-capable SNMP. - NMS migration copies old credentials into the new tool "temporarily." Temporary becomes three years.
- Packet capture in a "secure" DC still sees communities because encryption was never on the table for v2c.
None of these require nation-state attackers. They require haste and defaults.
If you inherit a network tomorrow, inventory communities like you inventory SSH keys: where stored, who knows them, what can they read, can they write. Then schedule the funeral for public.
RO strings for monitoring should be different from any leftover RW string—and different per security zone if you can stand the operational cost. One global RO for "all prod" means one leak reads all prod. Split when the blast radius scares you; document the matrix so the NMS doesn't become a graveyard of half-rotated secrets.
Terms: glossary.
Frequently asked questions
What is an SNMP community string?
A plaintext shared secret used by SNMPv1/v2c so the agent can accept or reject a manager's requests. Functionally a password, without modern password protections on the wire.
What is the default community string?
Conventionally public for read-only and private for read-write. Both must be changed; scanners try them first.
Is the community string encrypted?
No. In v1/v2c it is sent in cleartext over UDP. SNMPv3 is the path to authenticated/encrypted sessions (when configured with priv).
RO vs RW community—what's the difference?
RO allows reads (Gets/walks) per the view. RW also allows Sets. Monitoring almost always needs RO only; leave RW off unless you have a specific write use case.
Key takeaways
- Community string = v1/v2c shared secret, cleartext, sniffable on UDP 161.
- Defaults
public/privateare hostile; replace them. - Prefer random RO, ACL, OID allowlist; disable RW.
- Long-term: SNMPv3 (setup).
- External v2c: random string + allowlist—see ostr.io setup.
- Risks deep-dive: snmpv1-v2c risks.