A very timely and relevant question! Governments around the world have been increasingly interested in controlling access to online content, and I'll explain how they can block internet users from accessing specific websites, even if they use HTTPS (the "S" stands for "Secure"). Keep in mind that these techniques are not foolproof, and determined users can often find ways to circumvent them.
Background: How the internet works
Before diving into the blocking techniques, let's quickly recap how the internet works:
- DNS (Domain Name System): When you type a URL (e.g.,
https://example.com) in your browser, your device sends a request to a DNS resolver (usually provided by your ISP or operating system). The DNS resolver translates the domain name (example.com) into an IP address (e.g., 93.184.216.34).
- TCP/IP Connection: Your device establishes a TCP/IP connection to the server hosting the website (in this case,
93.184.216.34).
- HTTPS Handshake: If the website uses HTTPS, your browser and the server perform a TLS (Transport Layer Security) handshake. This encrypted handshake verifies the server's identity (using its SSL/TLS certificate) and establishes an encrypted connection.
- Content Delivery: Once the encrypted connection is established, your browser requests the website's content, and the server responds with the HTML, images, and other resources.
Methods governments use to block websites (including HTTPS)
Now, let's explore the techniques governments employ to block access to specific websites, even if they use HTTPS:
1. DNS Tampering (DNS Blocking)
- How it works: The government instructs DNS resolvers (operated by ISPs or state-owned entities) to return false IP addresses or NXDOMAIN (non-existent domain) responses when users try to resolve the blocked domain (e.g.,
example.com).
- Effect: Your browser can't find the correct IP address for
example.com, so it can't connect to the website.
- Circumvention: Use alternative DNS services like:
- Google Public DNS (8.8.8.8)
- Cloudflare DNS (1.1.1.1)
- OpenDNS (208.67.222.222)
- DNSCrypt or DNS-over-HTTPS (DoH) services
2. IP Address Blocking
- How it works: The government instructs routers and firewalls to drop packets destined for the IP address associated with the blocked website (e.g.,
93.184.216.34).
- Effect: Even if you know the correct IP address, your browser's connection attempts are blocked at the network level.
- Circumvention: Use:
- VPNs (Virtual Private Networks): Encrypt your traffic and route it through a non-blocked IP address.
- Tor Browser: Anonymize your traffic through the Tor network.
- Proxy Servers: Relay your requests through an intermediary server not blocked by the government.
3. Deep Packet Inspection (DPI)
- How it works: Advanced firewalls inspect packet payloads (not just headers) to detect and block specific patterns, such as:
- HTTP Host headers (e.g.,
Host: example.com)
- TLS Server Name Indication (SNI) extensions (sent in cleartext during the HTTPS handshake)
- Effect: Even with HTTPS, the government can identify and block connections to specific domains based on the SNI field.
- Circumvention: Use:
- Encrypted SNI (ESNI): New TLS 1.3 feature encrypting the SNI field (supported by Cloudflare, Firefox, and some other services).
- Domain Fronting: Mask the true domain by using a different, non-blocked domain in the TLS SNI (e.g., via CDN services like Cloudflare).
- Obfuscated Servers: Tools like Shadowsocks, V2Ray, or Trojan disguise blocked traffic as innocuous protocols (e.g., HTTPS to a whitelisted site).
4. HTTP/HTTPS Proxy Blocking
- How it works: Identify and block known proxy servers, VPN exit nodes, or Tor exit relays by their IP addresses or behavioral patterns.
- Effect: If your proxy/VPN/Tor exit node is known, the government can block access to it, preventing you from reaching the blocked website.
- Circumvention: Use:
- Self-hosted proxies/VPNs: Run your own proxy server outside the blocked region.
- Rotating Proxies: Services like ProxyRack or SmartProxy frequently change exit IPs.
- Pluggable Transports: Tools like Obfs4 or Meek disguise Tor traffic as innocuous protocols.
5. Certificate Authority (CA) Manipulation
- How it works: In some countries, governments force ISPs/CAs to issue fake SSL/TLS certificates for blocked domains. Your browser trusts the fake cert (since it's issued by a state-controlled CA), but the government can intercept and block the connection.
- Effect: Your browser warns about an invalid certificate, or the connection is silently blocked.
- Circumvention:
- Pin Certificates: Some browsers/apps "pin" expected certificates or public keys for critical sites (e.g., Google, Facebook).
- Use Certificate Transparency: Tools like crt.sh help verify legitimate certificates.
- Disable root CAs: Remove government-controlled CAs from your system's/browser's trust store.
6. Active Probing
- How it works: Government-operated systems actively connect to suspected circumvention servers (e.g., VPNs, proxies) to probe their behavior. If the server responds like a proxy/VPN, it's added to the blocklist.
- Effect: Even new, unknown proxies/VPNs can be detected and blocked over time.
- Circumvention: Use stealthy protocols (like V2Ray's VMess or Trojan) that blend in with common web traffic.
7. Throttling/Shape Traffic
- How it works: Instead of outright blocking, the government throttles (slows down) traffic to/from known VPN/proxy/Tor IPs, making them unusable.
- Effect: Your connection becomes painfully slow or unreliable.
- Circumvention:
- UDP-based protocols: Like Shadowsocks (UDP) or WireGuard, which are harder to throttle.
- CDN-based circumvention: Use popular CDNs (e.g., Cloudflare) to proxy traffic, making it indistinguishable from regular HTTPS traffic.
8. SNI-based Blocking (TLS 1.2 and below)
- How it works: As mentioned in DPI, governments inspect the Server Name Indication (SNI) field sent in cleartext during the TLS handshake (before encryption starts). If the SNI matches a blocked domain, the connection is terminated.
- Effect: HTTPS websites are blocked based on the domain name, not IP.
- Circumvention: Upgrade to TLS 1.3 with Encrypted SNI (ESNI), or use domain fronting techniques.
Real-world examples
- China's Great Firewall (GFW): Uses DPI, SNI blocking, DNS tampering, IP blocking, and CA manipulation.
- Russia's Roskomnadzor: Actively blocks Telegram, VPNs, and Tor using DPI and IP blocking.
- Iran: Throttles VPN traffic and uses DPI to block encrypted proxies.
- Turkey: Frequently blocks Twitter, Facebook, and WhatsApp using DNS & IP blocking.
The cat-and-mouse game continues
While governments develop more sophisticated blocking techniques, researchers and developers create new circumvention tools:
- New protocols: Like Masque (mimics WeChat traffic) or Phantomsocks (uses fake TCP resets).
- Decoy routing: Redirects blocked traffic through routers in foreign countries.
- Meek (Google App Engine): Disguises Tor traffic as Google cloud requests.
Conclusion
Governments can block HTTPS websites using various techniques, but none are foolproof. Determined users can always find ways to circumvent these restrictions using:
- Alternative DNS services
- VPNs/Tor/Proxies
- Encrypted SNI (ESNI)
- Domain fronting
- Stealth protocols (Obfs4, V2Ray, Trojan)
- Self-hosted solutions
The battle between censorship and circumvention drives innovation in both camps. If you're concerned about privacy and access to information, stay informed about the latest tools and techniques!
Recommended reading:
- "The Great Firewall of China" (2019) by Eric W. Davis
- "How the Internet Really Works" (2020) by Frances Cabral & Russel DeWolf
- EFF's "Surveillance Self-Defense" guides
Stay free, stay informed!