26
Module 26

The firewall family: how each telecom firewall works

Every telecom firewall explained: SS7, Diameter, GTP, SMS, SBC, SEPP, NGFW; rules and operation.

On this page · 11 sections

A telecom operator runs many different "firewalls", each tuned to one protocol or one threat. This module explains what each one inspects, where it sits, what rules it uses, and how it is operated — so that, together with Module 25 (the attacks), you can connect every attack to the control that stops it.

1. The big map

                         INTERNET / IT                      OTHER OPERATORS (interconnect)
                        ┌────────────┐                  ┌───────────────────────────────────┐
  Customers ── RAN ──▶  │ NGFW / WAF │                  │  SS7/SIGTRAN FW  Diameter FW (DEA) │
  (user plane)          │ DDoS / DNS │                  │  GTP FW    SBC/IBCF   SEPP (5G)    │
                        └────────────┘                  │  SMS FW (P2P+A2P)  Voice FW        │
                                                         └───────────────────────────────────┘
        inside:  SecGW (IPsec) on backhaul · segmentation of OAM / control / user plane
                 · SIEM/SOC · FMS (fraud) · PKI/HSM
Family Protects Position Looks at
SS7 / SIGTRAN firewall MAP, CAP, ISUP, SCCP, MTP3 At/around the STP on all international links Point codes, GTs, opcodes, IMSI/MSISDN, location
Diameter firewall (DEA / DRA) S6a, S6d, Gx, Cx, S6c, … Roaming/IPX edge Command codes, Origin-Host/Realm, IMSI, rate
GTP firewall GTP-C and GTP-U on S8/Gp/Gn Roaming/GRX edge Message type, IMSI↔PLMN, TEID state, APN, RAT
SMS firewall SMS (P2P and A2P) Around SMSC and SMPP gateways Sender, route, content, volume, destination
Voice / SIP firewall (SBC, IBCF) SIP, RTP Interconnect and access edge SIP syntax, CLI, rate, media
SEPP 5G N32 roaming Border of 5GC TLS/PRINS, allowed APIs, partner identity
API gateway / SCP / NRF policy 5G SBA, NEF Inside 5GC + exposure OAuth2 scopes, NF identity
NGFW / WAF / DDoS / DNS firewall IT, portals, DNS, internet-facing Internet edge IP/L7, web attacks, volumetric floods
Security Gateway (SecGW) RAN backhaul (S1/NG/X2/Xn) Core edge IPsec/IKEv2, certificates
FMS / revenue assurance Revenue Offline on CDRs / real-time Behaviour patterns

2. The SS7 / SIGTRAN firewall in detail

2.1 Where it sits (deployment models)

Model How it works Pros / cons
Integrated in STP Screening module inside the STP Simple; limited logic
Standalone inline (transparent) All international traffic is routed through the firewall Full control; single point of failure, needs HA
GT redirection / "GT hijack" for home routing The firewall owns a GT that the world uses for SMS/HLR queries and then talks to the real HLR Enables home routing and HLR masking
Passive monitoring (probe/mirror) Copy of traffic analysed; alerts only Safe to start; cannot block
Hybrid Monitor first, enforce later Recommended path: learn → alert → block

2.2 Screening layers (from low to high)

  1. MTP3 — OPC/DPC allow-lists; drop unknown point codes.
  2. SCCP — Called/Calling party GT analysis (country code, number range ↔ operator), SSN, GT translation consistency.
  3. TCAP — Dialogue/application context, transaction IDs, malformed packets.
  4. MAP/CAP/ISUP — Operation code, parameters (IMSI, MSISDN, VLR/MSC GT, SM-RP-OA), error handling.

2.3 The GSMA categories (FS.11)

Category Idea Typical examples Action
Cat 1 Messages that should never come from outside because they only make sense inside your network ATI from external, ISD from non-HLR, CancelLocation from non-HLR, external CAMEL data, PSI for roamers Block
Cat 2 Messages valid only if the sender really is who the message implies (the "home/visited" relationship) UpdateLocation, PurgeMS, ForwardSM, PRN: the sending GT must be the real VLR/MSC/SMSC of the subscriber Verify, otherwise block
Cat 3 Messages valid in general, but abusable if the context is inconsistent SRI-SM, SRI, UL when subscriber location/time doesn't fit Cross-check history, rate, geography

2.4 Example logic (pseudo-rules — conceptual)

RULE ATI_from_external
  IF opcode == AnyTimeInterrogation AND source_network != HOME
  THEN BLOCK, ALERT(severity=high)

RULE UL_consistency   (Category 2/3)
  IF opcode == UpdateLocation AND imsi.home == OURS
     AND source_GT NOT IN roaming_partners(imsi_country_of_last_attach)
  THEN BLOCK
  IF opcode == UpdateLocation AND travel_time(last_vlr, claimed_vlr) < physical_minimum
  THEN BLOCK, ALERT("impossible travel")

RULE SRI_SM_reconnaissance (Category 3)
  IF opcode == SRI_SM AND count(source_GT, 60s) > T1
     AND ratio(forwardSM_after_sri) < 0.2
  THEN THROTTLE or RETURN home-routing answer, ALERT

RULE MT_SMS_correlation (Category 2)
  IF opcode == MT_ForwardSM AND NOT exists(SRI_SM from same GT for same IMSI in last N sec)
  THEN BLOCK   # MT SMS without prior routing request = spoofing

Note the logic is stateful: the firewall remembers recent traffic per subscriber (location history, outstanding SRI-SM, etc.).

2.5 SMS home routing (the key defensive trick)

  1. External SMSC sends SRI-SM for the subscriber.
  2. The firewall/home-routing node answers with its own SMSC GT as "serving MSC" and a temporary/fake IMSI (a correlation ID).
  3. The external SMSC delivers the message to the home network's SMS router.
  4. The home network checks it (spoof, spam, content) and then delivers it through the real MSC/IMSI internally. Result: the outside world never learns the real IMSI or serving MSC, so subscriber discovery and location tracking via SMS routing fail.

2.6 Operating the firewall (lifecycle)

Phase What happens
Baseline Collect traffic for weeks; learn partners, normal volumes
Monitor mode Rules alert only; analysts tune them
Enforce gradually Start with Cat 1, then Cat 2, then Cat 3
Partner management Whitelists per roaming partner, exception handling when partner changes GTs
KPIs Blocked messages by category, false-positive rate, latency added, top sources, attack trends
Intel feeds Known malicious GTs, GSMA reports, peer sharing
Testing Lab replays of attack traces; acceptance tests when adding rules (GSMA FS.11 test cases)
Resilience High availability, fail-open vs fail-closed decision (usually fail-open for roaming, with alarms)

3. The Diameter firewall (DEA / DRA with security)

  • Topology hiding: the outside sees only the DEA's identity, not your MME/HSS hostnames and realms.
  • Message filtering: allowed commands per direction and per partner (e.g. an inbound partner may send AIR/ULR for its roamers but never CLR/IDR/PLR to your home subscribers unless they originate from your HSS).
  • Identity checks: Origin-Host/Realm vs. source IP and the TLS certificate; IMSI MCC/MNC vs. realm.
  • Stateful correlation: requests answered once, answers matching an earlier request, S6a session lifetime.
  • Rate and volume controls: per IMSI, per realm, per command; AIR vector limits.
  • Interworking filter: if Diameter is converted to MAP (IWF), apply SS7 rules after conversion.
  • Transport security: TLS/DTLS or IPsec between peers when partners support it.
  • Overload: DOIC (Diameter Overload Indication Conveyance) and throttling.

4. The GTP firewall

Check Purpose
Stateful tunnel table Allow GTP-U/Modify/Delete only for sessions seen in a valid Create Session
IMSI ↔ partner PLMN Reject Create Session if IMSI doesn't belong to the sender's network
Cross-check with attach data Is the IMSI really attached in the visited network (S6a log)?
APN and RAT allow-lists Only expected APNs and radio types for this partner
Message-type controls Block unexpected types (e.g., SGSN Context Request from an unknown peer)
TEID checks and randomisation Prevent guessing and spoofing
Rate limits Echo floods, session storms
Anti-spoofing at GRX/IPX edge Only partner prefixes accepted
Gi/SGi hardening Roaming sessions can't reach management networks
Logging Per-session metadata for forensics and billing reconciliation

5. SMS firewalls (P2P and A2P) in depth

Module What it does
P2P firewall — anti-spoofing Rejects international inbound SMS pretending to come from a home subscriber (MO-looking MT)
Home routing As in 2.5
Anti-flooding / rate limits Per sender, per destination, per partner
MO check Verifies MO-ForwardSM originates from a legitimate serving MSC of the subscriber
Type-0 / silent SMS handling Block or alert on silent pings used for tracking
Binary / OTA SMS filter Drop SIM-toolkit messages from outside (Simjacker-type defence)
A2P gateway — sender ID registry Only registered alphanumeric senders allowed for each customer; block brand spoofing
Content filtering Keywords, patterns, URL reputation, templates, ML classification of smishing
Route control Detect grey routes (A2P traffic masquerading as P2P through SIM farms or non-commercial links) and enforce commercial termination
Traffic analytics AIT/SMS pumping detection: sudden volume to few destination prefixes, abnormal conversion rate (OTP sent but never entered)
Subscriber controls Opt-out lists, spam reporting (7726 "SPAM" in many countries), parental controls
Actions Allow · block · silently discard · return delivery failure · quarantine · rewrite sender · redirect to analysis
Revenue Correct monetisation: firewall recovers lost A2P termination revenue

6. Voice and SIP security

Control What it does
SBC / IBCF Terminates and rebuilds SIP, hides topology, normalises headers, enforces codecs, rate-limits INVITE/REGISTER, anchors media (SRTP), blocks scanning IPs
STIR/SHAKEN (or national equivalents) Cryptographic attestation (A/B/C) of caller ID; SBC adds/validates Identity header
CLI validation Rejects invalid or domestic CLI arriving on international trunks
Robocall/spam analytics Scores callers by pattern (short calls, high volume, many destinations), labelling or blocking
Wangiri/IRSF controls Block calls to high-risk ranges, short-duration pattern detection, premium-rate barring
SIM-box detection Test-call platforms, CDR pattern analytics, CLI-ACD analytics
Emergency call protection Prevent abuse but never block valid 112
Voice firewalls for enterprises Prevent toll fraud at PBX/SIP trunk level

7. 5G: SEPP, SCP, NRF, NEF

Component Defensive role
SEPP Mutual TLS (N32-c), protection of N32-f with TLS or PRINS (JWS signing/JWE encryption of selected fields), message filtering of roaming APIs, topology hiding, rate limiting, inter-PLMN policy
SCP Central routing, load-balancing, token validation, observability
NRF Registers NFs, issues OAuth2 tokens with scopes; authorisation policy for who may call whom
NEF + API gateway Authentication of third-party apps, quotas, usage logging, privacy checks
AUSF/UDM protection Only AMF/SEAF may request authentication; SUCI deconcealment is internal
UPF N6 firewall Inspect user traffic leaving to the internet (DPI, filtering)
Slice firewalls Per-slice security policy, network policies in Kubernetes
gNB/AMF security IPsec for NG-C/NG-U; certificates for gNB

8. Perimeter and IT-side controls (what telecom shares with every company)

Control Purpose
NGFW L3–L7 filtering, application ID, IPS
WAF Protects customer portals, APIs, self-service apps (OWASP Top 10)
DDoS protection Scrubbing centres, BGP blackholing / FlowSpec, anycast, rate limiting
DNS firewall / RPZ Block malicious domains, protect resolver, DNSSEC validation
Email security Anti-phishing, DMARC/SPF/DKIM
PAM / bastion hosts Controlled admin access, session recording
NAC / 802.1X Control devices on internal LANs
EDR / XDR Endpoint detection on servers and admin laptops
Vulnerability management Patching cycles, CVE feeds, SBOM
SIEM + SOAR Central log analysis and automated response
Deception Honeypots/honey-GTs to learn attacker behaviour
PKI + HSM Certificates for IPsec/TLS, secure key storage (SIM key generation, Ki/OPc)
Backup & DR Offline backups, tested restore
IR plan NIS2 timelines: early warning within 24 h, notification within 72 h

9. Defence in depth for a telecom operator

Layer Controls
1. Governance Risk management, policies, ISO 27001, NIS2, supplier management
2. Perimeter & interconnect SS7/Diameter/GTP/SMS/Voice firewalls, SEPP, SBC
3. Network design Segmentation: OAM vs signalling vs user plane; private management network; no direct internet to core
4. Transport protection IPsec for backhaul (SecGW), MACsec, TLS
5. Platform security Hardening, patching, secure boot, container security
6. Identity & access Least privilege, MFA, PAM, logging of admin actions
7. Detection & response SIEM/SOC, anomaly detection, fraud systems, threat intel
8. Resilience Redundancy, DR tests, tabletop exercises
9. Assurance Pen tests, red teams, NESAS/SCAS vendor assessments, audits
10. People Training (social engineering), insider-risk programme

10. Choosing the firewall — a decision table

You want to stop… Use…
Foreign party learning IMSI/location of your subscriber SS7 FW + SMS home routing; Diameter FW
SMS/OTP interception SS7/Diameter FW (UL consistency, Cat 2/3) + customer education/2FA alternatives
Spoofed SMS, smishing SMS FW (sender ID, content, MT correlation)
SMS pumping / fake traffic SMS FW analytics + OTP provider controls
Free data / session theft on roaming GTP FW (stateful) + S6a correlation
Call spoofing and robocalls SBC + STIR/SHAKEN + voice analytics
Toll fraud and IRSF SBC + FMS + spend limits
5G roaming signalling abuse SEPP + OAuth2/mTLS
Fake base station RAN controls + disable 2G + detection; (firewalls cannot see it)
Web portal/API attacks WAF + API gateway
Volumetric attacks DDoS scrubbing
Insider/vendor abuse PAM, logging, change control

11. Common mistakes and limits

  • Only one protocol protected — attackers switch from SS7 to Diameter or to IWF routes. FS.21 insists on a consistent policy across all.
  • Firewall in monitor mode forever — alerts nobody reads.
  • Fail-open without alarms — silent bypass.
  • Whitelisting too wide (every partner trusted for everything).
  • Ignoring the radio side — SMS blasters / IMSI catchers never touch the firewall.
  • No correlation with subscriber state — rules that look only at syntax.
  • Not testing after changes — new GT for HLR breaks home routing.
  • Forgetting 2G/3G — legacy fallback paths remain.
  • Treating firewalls as the whole solution — they reduce risk; authentication design (no SMS-only 2FA) and customer education complete it.

Remember this: each firewall answers the same four questions for its own protocol — Who is the sender? Is this message allowed from outside at all? Does it fit this subscriber's real state? Is the volume normal? Different protocol, same logic.