The Bind You Forgot About: Auditing SMPP Sessions Before Someone Else Does
Photo: U.S. Air Force photo by Tech. Sgt. Clayton Lenhardt, Public domain, via Wikimedia Commons
Nothing in your rack looks more trustworthy than an SMPP bind that has been up for 400 days. No flaps, no reconnects, no alerts. That is exactly why it deserves a hard look: a bind is three things — a system_id, a password, and a TCP socket — and none of those age gracefully without help. If that password got pasted into a team chat two years ago and nobody rotated it, your session is healthy and your authentication is theater.
What follows is a working audit for the binds your gateway holds with carriers and aggregators. It's written for the person who inherited the configs, and structured so you can hand the output to a carrier's security questionnaire without rewriting it.
Build a bind inventory you can defend
Dump every configured bind: system_id, remote host, port, bind type (transmitter, receiver, or transceiver), local source IP, and the human who owns the relationship on your side. Then sort them into three piles — production, vendor test, and archaeological. That third pile is where trouble lives: a transceiver opened for a load test in 2024, still active, still accepting submits, tied to a contractor who moved on.
Cross-check the inventory against reality. ss -tnp on the gateway, or a netflow query, will show live sessions. A session that exists but isn't on your list is your first finding. So is a bind configured but unused — attack surface with a friendly name.
Rotate credentials like you mean it
SMPP authentication is weak by design. There's no second factor, no token exchange, nothing mutual unless you build it yourself with TLS client certificates. The password is the whole lock.
- Rotate on a schedule, and rotate immediately on any staff departure or vendor change.
- Keep test and production credentials in separate namespaces. A shared system_id between staging and prod is how a load test ends up submitting to live handsets.
- Store secrets in a secret manager, not in a config file that gets committed to a repo you'll open-source in eighteen months.
- Rotate without dropping traffic where the peer allows two credential sets briefly. Ask. If they won't, book a maintenance window and own it.
Look at the system_id itself, too. Some aggregators issue a per-customer prefix; if yours is generic or shared across tenants, per-bind attribution becomes guesswork later.
The IP allowlist is the real control
If your peer supports source IP allowlisting, that is doing more work than the password. Confirm it's on, confirm the listed address is the one you actually egress from — not a NAT address that changed when your cloud provider renumbered a subnet — and confirm the list doesn't include the /24 that was handy at the time.
On your side, restrict inbound connections to known peer ranges at the firewall. An SMPP listener on 0.0.0.0 with a strong password is still an open port facing the internet.
Plaintext binds are a decision, not a default
SMPP over plain TCP has been the norm forever, and plenty of US aggregators still offer it. That doesn't make it free — message bodies, MSISDNs, and credentials cross the public internet in the clear.
Most carriers and aggregators now support SMPP over TLS, typically on 3550 though not always. Where it's available, use it with certificate validation on. Not verify=False — that is the single most common sin I see in gateway configs. Where TLS isn't offered, ask whether the link is a private interconnect or a VPN. If the answer is that it's fine because they've always done it that way, document that you asked, and get it in writing.
Cap the session, not just the credentials
Per-bind session limits do two jobs: they stop a runaway client from opening forty transceivers after a reconnection storm, and they make a shared credential obvious. If the peer supports a maximum session count, set it. If they don't, enforce it on your gateway.
While you're in there, check the boring timers. The enquire_link interval and response timeout should match what the peer expects. Too aggressive produces reconnect storms that look like an attack to the carrier's monitoring. Too lax leaves you holding a dead session while your queue backs up.
Log enough to answer the awkward questions
Eventually a carrier will ask about a specific message. The question is polite, and it means: prove this came from you, prove when, and prove what the submit looked like.
Per-submit logging that survives that conversation:
- Timestamp with timezone, plus the
submit_smmessage_id you generated and the one the peer returned. - system_id and source IP of the bind.
- Destination MSISDN, hashed or truncated to match your retention policy.
source_addrwith its TON and NPI as sent, not as intended.data_coding,esm_class,registered_delivery.- Final DLR state and its timestamp.
Store it somewhere nobody can quietly edit yesterday's entries. Object storage with a retention lock is cheap insurance.
Alerts that catch the boring failures
A bind that drops at 3 a.m. and reconnects four seconds later is noise. A bind that reconnects from an IP you don't recognize is an incident. Alert on new source IPs for an existing system_id, authentication failures above baseline, session counts over the cap, and submits from a system_id that's been idle for weeks.
The one page you keep
Inventory table, rotation dates, TLS status per peer, allowlist confirmation, session limits, and a sample of the attribution log. Refresh it quarterly. Next time a carrier sends a vendor risk assessment — or asks why 40,000 messages left your account on a Sunday — you'll have the answer before lunch instead of reconstructing it from shell history.