---
title: "Enforcing encryption at scale"
description: "Meta enforces TLS on internal service traffic with SSLWall, a host-level daemon plus eBPF programs that detect and cut off plaintext connections, chosen over L7 firewalls to keep the blast radius small and allow fine-grained rollout."
url: "https://swe.quest/articles/enforcing-encryption-at-scale-123c858612356c4f"
canonical: "https://engineering.fb.com/2021/07/12/security/enforcing-encryption/"
source: "Meta Engineering"
published: "2021-07-12"
difficulty: "hard"
kind: "Case study"
reading_minutes: 7
tags: ["linux","security","cryptography","networking"]
---

# Enforcing encryption at scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2021-07-12, 7 min read, Case study. Original: [https://engineering.fb.com/2021/07/12/security/enforcing-encryption/](https://engineering.fb.com/2021/07/12/security/enforcing-encryption/)

## Summary

Meta enforces TLS on internal service traffic with SSLWall, a host-level daemon plus eBPF programs that detect and cut off plaintext connections, chosen over L7 firewalls to keep the blast radius small and allow fine-grained rollout. It combines a tc-bpf filter, kprobes on tcp\_connect and tcp\_v6\_destroy\_sock, and BPF maps. It supports a passive monitoring mode, bypasses for BGP/SSH, and plaintext-then-TLS flows like STARTTLS and HTTP CONNECT. Lessons included handling TCP Fast Open ordering via kprobe prehandlers, BPF program size limits, and keeping CPU overhead trivial with early exits and arrays instead of LRU maps. For noncompliant long-tail apps, Transparent TLS uses a cgroup/connect6 BPF hook to redirect connect() calls to a local encrypting proxy, skipping connections that already use TLS.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)

## Prerequisites

- eBPF basics ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- TLS ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- Linux networking stack ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- TCP connection lifecycle ([easy posts on Networking](https://swe.quest/tags/networking.md?difficulty=easy))

## Keywords

SSLWall, eBPF, tc-bpf, kprobes, Transparent TLS, TCP Fast Open, STARTTLS, cgroup/connect6

## Related posts

- [OpenAI and Cisco introduce Shirudo](https://swe.quest/articles/openai-and-cisco-introduce-shirudo-b1360eae5b5122c5.md): OpenAI · 2026-11-23 · Easy · 4 min read · Linux, Security, AI agents, Open source
  Shirudo is an open-source runtime from OpenAI and Cisco that uses eBPF "shields" to block vulnerable code paths on running Linux systems while patches are prepared, without restarts.
- [Proxy Please: Help People Connect to Signal](https://swe.quest/articles/proxy-please-help-people-connect-to-signal-dcf58b9a868b0769.md): Signal · 2024-08-09 · Easy · 3 min read · Networking, Privacy, Communications
  With several countries blocking Signal, users can turn on the built-in censorship circumvention setting or connect through community-run Signal TLS proxies, configured by tapping a signal.tube link or entering details manually on Android or iOS.
- [We’re making Tailscale faster](https://swe.quest/articles/we-re-making-tailscale-faster-039902ebbb2b850c.md): Tailscale · 2026-09-22 · Medium · 8 min read · Networking, Performance engineering, Linux
  Tailscale is speeding up its Linux and Android data plane by parsing small packets in place inside the large GRO read buffer instead of copying each into its own 64 KiB buffer, which gave roughly a 5% speed-up.
- [Post-quantum readiness for TLS at Meta](https://swe.quest/articles/post-quantum-readiness-for-tls-at-meta-92c6471e952cc018.md): Meta Engineering · 2024-05-22 · Hard · 8 min read · Cryptography, Networking, Concurrency, Debugging
  Meta has deployed hybrid X25519+Kyber key exchange in its Fizz TLS library for most internal service traffic, prioritizing store-now-decrypt-later protection where it controls both endpoints.
- [Using short-lived certificates to protect TLS secrets](https://swe.quest/articles/using-short-lived-certificates-to-protect-tls-secrets-b95eb80ecde3a8e1.md): Meta Engineering · 2023-08-07 · Medium · 7 min read · Cryptography, Security, CDN & edge, Deployment
  Meta now limits TLS private key exposure on its edge to 10 days by rotating short-lived certificates daily, after rejecting CRL/OCSP revocation (latency, failure modes), remote signing from datacenters (vulnerable to backbone and datacenter outages) and delegated credentials (insufficient browser support).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
