How the Great Firewall of China Works
This article examines the technical systems deployed by Geedge Networks a Chinese company whose surveillance and censorship infrastructure is used by China and other authoritarian governments. While Geedge's products represent a major component of China's censorship apparatus, they operate alongside multiple other vendors, government agencies, and platform-level controls. The "Great Firewall" is a dynamic multi-layered system combining network-level filtering (like TSG), platform moderation, and legal enforcement. This article focuses specifically on how Geedge's technical stack enables the monitoring and control along with how it works.
Introduction
In the previous article about Geedge Networks, it is mentioned that the system primarily relies on Tiangou Secure Gateway (TSG) units, specialized appliances installed at ISP network choke points where data enters or leaves the country. These are engineered for deep inspection and traffic control.

The TSG-X is the integrated hardware package running these systems. Originally built on white-label servers from Western vendors like HP Enterprise and Dell, the system has shifted toward hardware from Chinese manufacturers like Nettrix to ensure hardware sovereignty and avoid the impact of international sanctions.

The TSG-X bundles several critical components:
- TSG-OS: A hardened, custom Linux-based operating system that strips away unnecessary services and digitally signs every binary to prevent tampering. It utilizes Docker containers, Kubernetes, and Ansible for configuration management.
- MARSIO: A packet-processing module using data-plane technology (DPDK) to bypass kernel limitations. This allows the system to normalize diverse traffic streams including QUIC, SIP, and UDP-based games for inspection at scale.
- Ether Fabric: A high-speed switching fabric and network packet broker that routes packets to the correct inspection engine with minimal latency, allowing dozens of TSG nodes to work in parallel.
- Network Zodiac: A health-monitoring subsystem that tracks CPU load, memory usage, and throughput, providing remote administrators with an SSH web terminal for troubleshooting.

These units are standard rack-mount hardware integrated into existing ISP infrastructure. By positioning them at critical junctures in the network topology, a relatively small number of devices can inspect and control traffic at national scale.
Traffic Processing and DPI
Traffic passes through a TSG unit in one of two modes:
Mirrored (passive) mode: Traffic continues normally while an optical bypass switch sends a copy to the TSG for analysis. This ensures that if the system crashes, the internet remains functional. In this mode, the government can observe and analyze, but active blocking requires slower packet injection techniques to disrupt connections after the fact.
In-line (active) mode: Traffic passes directly through the TSG hardware, giving the system absolute authority to drop connections, inject reset packets, or redirect requests. While this provides immediate blocking, it introduces small latency increases and carries the risk that a hardware or software failure could take down the entire country's internet. A switch from mirrored to in-line mode is often a warning sign that a government is preparing for a total internet shutdown.
Most deployments use a hybrid approach: mirrored mode for normal monitoring and in-line mode for crisis situations or mass blocking events.
The core capability of the system is Deep Packet Inspection (DPI), which identifies activity without decrypting encrypted traffic by examining metadata. The system employs several methods:
- Transport-layer inspection: Capturing IP addresses and port numbers.
- DNS analysis: Logging domain names requested.
- TLS fingerprinting: Examining the encrypted handshake to identify operating systems and applications.
- Packet analysis: Studying packet sizes, timing, and flow characteristics to infer the application in use.
- Traffic pattern matching: Comparing behavior against known signatures for VPNs, Tor, and proxies.
Once the TSG identifies forbidden traffic, it employs specific blocking techniques. For HTTP websites, it can inject fake responses to simulate a "connection refused" message. For other protocols, it sends forged TCP reset packets to trick the user and server into thinking the other side disconnected.
For encrypted HTTPS traffic, the system may deploy Man-in-the-Middle (MITM) decryption, which requires the installation of a government certificate on the user's device. In cases of high-bandwidth encrypted traffic that cannot be identified, the system often employs a timeout block, cutting the connection after a set period (typically 24 hours) on the assumption that unidentified high-bandwidth traffic is a circumvention tool.

Identity Linking and the Sanity Directory
The system links every packet to a real person through the Sanity Directory.
This component connects IP addresses and device identifiers to identities by integrating with ISP authentication systems using RADIUS for broadband and 3GPP for mobile. This allows the system to determine who owns a connection, detect users sharing a public IP, and identify mobile tethering. It further enhances tracking by triangulating location based on cell tower IDs. In regions with biometric SIM registration, such as Pakistan, the Sanity Directory instantaneously links a connection to a person's complete government record, including fingerprints and photos.
All captured data flows into TSG Galaxy, a permanent data warehouse. Galaxy stores a comprehensive record of every TCP and UDP connection, every DNS query, and every VoIP call indefinitely, along with TLS fingerprints and lists of installed applications.

This permanent record enables the weaponization of history. If a website is declared illegal tomorrow, analysts can query Galaxy to find everyone who accessed that site months or years ago. This creates a system where actions that were legal at the time they were performed can be used as grounds for retroactive punishment.
Enforcement and Circumvention detection
The system operates on two timescales for enforcement:
Real-time blocking: When the government decides a website should be blocked, the update propagates to every TSG unit within hours. Users trying to access it see an instant refusal.
Historical blocking: Every user's complete internet history remains queryable forever. If a site is declared illegal retroactively, all past visitors can be identified and investigated.
This two-track system creates a panopticon where: - Your current behavior is monitored and enforced - Your past behavior can be weaponized against you at any moment
The TSG checks a live blocklist in milliseconds to terminate connections to forbidden destinations. This list includes domain-level blocks, keyword filters, service blocks (VPN providers, Tor exit nodes), and IP-level blocks. Because DPI operates on metadata, blocking happens without needing to inspect encrypted content.

To identify VPNs, Tor, and other circumvention tools, the system uses AppSketch, a database of application fingerprints; it recognizes handshake patterns and matches traffic against known VPN fingerprints to identify specific protocols like OpenVPN and WireGuard. If a user switches to a new, unblocked VPN, the system can identify them as a "known VPN user" and track the new service, which is then added to the blocklist.
Specific applications are handled as follows: - Tor: Blocked at the Directory Authority connection level. - Orbot: Blocked by recognizing distinctive traffic patterns. - Psiphon: Blocked at the application level and by identifying proxy nodes.
The Reputation Scoring System
The Great Firewall punishes users for attempting to use circumvention tools or accessing blocked content. This happens through an automated reputation score that every subscriber receives.

The reputation score fluctuates based on online behavior. Accessing blocked content or using circumvention tools causes the score to drop, triggering penalties in stages:
- Bandwidth Throttling: Initial drops may result in severe throttling, making streaming or high-speed browsing impossible.
- Selective Blocking: Further declines trigger the loss of access to specific sensitive websites while basic connectivity remains.
- Service Termination: Once a critical threshold is crossed, the system automatically cuts off internet service entirely.
Before connectivity is restored, users are often required to sign a formal confession or apology document. Once verified, their internet is reconnected, but they are placed on a heavy monitoring/surveillance list. This process is automated; algorithms make the decisions without human review until the point of total service termination.

Analysis: Cyber Narrator
Cyber Narrator is the government analyst's interface to the data stored in Galaxy. It is a query tool that converts metadata into actionable intelligence. Analysts can search for users in specific regions who accessed certain domains, identify flagged VPN users, or monitor traffic during specific events.
The dashboard provides several capabilities that were showcased before: - Real-time tracking: Linking mobile subscribers to cell tower IDs for precise triangulation. - Geographic monitoring: Generating heat maps to identify clusters of people during protests or neighborhoods with high VPN usage. - Relationship mapping: Cross-referencing data to create graphs of who is communicating with whom. - Automated alerts: Generating notifications when suspicious patterns emerge.

An analyst can type searches like:
- "Show me everyone in Shanghai who accessed nowhere.moe in the past month"
- "Find all users in this province who are flagged as VPN users"
- "Display all traffic during the protest on October 15th"
- "Who accessed this website before we blocked it?"
Conclusion
The system operates as a multi-layered architecture. National-level blocks apply everywhere, while provincial firewalls add local filtering rules for specific regions. Individual ISPs may also implement customized rules, a user's experience therefore depends on their geographic location, ISP, and reputation score.
Geedge Networks engineers in China maintain the system via secure remote tunnels to deploy filtering rules, update DPI signatures, and push software updates. This means data captured in one country is accessible to staff in China. Additionally, snapshots of customer data are shared with research institutions for system improvement. Blocking innovations developed in one country are automatically deployed to all others using the system providing 24/7 support.
This design creates a panopticon where current behavior is monitored and past behavior can be weaponized at any moment. Because the system operates at the network level, it cannot be disabled by open-source software. By combining metadata analysis, automated reputation penalties, and permanent historical storage, the system achieves total control without requiring the government to block everything.
Note on sources: This article synthesizes findings from the 2025 Internet Coup technical investigation, the USENIX Security 2024 research on Great Firewall architecture, reportings from ChinaFile and China Media Project on VPN policy implementation, and analysis of leaked system documentations detailing how these components operate in practice. The system described here represents the documented capabilities of the Great Firewall as of 2025-2026.
Further Reading
- https://blog.xeovo.com/what-is-the-great-firewall-of-china-and-why-you-should-care/
- https://www.usenix.org/conference/usenixsecurity24/presentation/hoang
- https://locknet.chinafile.com/the-locknet/intro/
- https://cbltranslations.com/en-us/china-law/privacy/vpn-computer-crimes-laws-translated/
- https://chinamediaproject.org/2025/11/13/ai-cop-signals-vpn-crackdown/
- https://www.chinafile.com/reporting-opinion/features/leaked-documents-show-success-of-chinas-vpn-crackdown
Suggest changes
Lain 2026-10-24
Donate XMR to the author:
4AGtz56WqJdXYt8qhkDbHRNaSTdu2nKuEGwDVzxeWPodQj1cVH2EQkk4fi9uAu8os1fazSUBDsqeFBqoEzAFuay3Fwd9BjJ