Course contentsShow
← Security
Lesson 2992 of 3,05255. Secure CommunicationsFree lesson

Censorship Techniques and Detection Methods

Understanding how censorship is implemented through DNS filtering, IP blocking, DPI, and keyword filtering mechanisms.

Censorship Techniques and Detection Methods

What you'll learn: How censors block internet content using DNS filtering, IP blocking, deep packet inspection, and keyword filtering—and how these techniques can be detected.

The Arms Race Between Censors and Free Speech

When governments or organizations want to control what people can access online, they deploy censorship techniques at various layers of the network stack. Understanding these methods is crucial for developing circumvention tools like Tor.

Core Censorship Techniques

DNS Filtering

The simplest approach: when your device asks "What's the IP address of blockedsite.com?", the censored DNS server lies or returns nothing. It's like a librarian saying a book doesn't exist when it actually does.

IP Blocking

Firewalls block traffic to/from specific IP addresses. If blockedsite.com is at 203.0.113.5, any connection attempt to that IP gets dropped. This breaks all services hosted there, even unrelated ones.

Deep Packet Inspection (DPI)

The most sophisticated method: censors examine the content of network packets in real-time. DPI can identify protocols (spotting Tor traffic patterns), detect specific websites even when using shared IPs (via SNI in TLS), or flag suspicious encrypted traffic.

Keyword Filtering

Censors scan unencrypted traffic for banned words or patterns. HTTP requests containing certain terms trigger blocks. This becomes ineffective against HTTPS but can still target DNS queries.

Detection Methods

Censorship can be detected through:

  • Differential testing: Comparing responses from inside vs. outside the censored region
  • Connection resets: Unexpected TCP RST packets during connections
  • DNS inconsistencies: Different answers from local vs. international DNS servers
  • TLS handshake failures: Blocks triggered by SNI or certificate patterns
  • Timing analysis: Unusual latency patterns suggesting middlebox interference

Key Takeaway: Censors operate at multiple network layers—DNS, IP, and application-level—with DPI being the most powerful but resource-intensive method, while detection relies on comparing expected vs. actual network behavior across trusted and untrusted paths.