Tor is designed to resist blocking, which means DNS filtering alone cannot stop it. This guide covers a layered approach using DNS, firewalls, deep packet inspection, and endpoint controls to reduce Tor usage on your network.
Learn About PricingUnlike most internet applications, Tor does not rely on DNS to establish connections. The Tor client uses hardcoded IP addresses to contact directory authorities and relay nodes. This means that even if you block every Tor-related domain at the DNS level, the Tor client can still connect directly by IP once it is installed.
DNS filtering does serve one important purpose: it can block access to the Tor Project website and Tor Browser download pages. If users cannot download the Tor Browser in the first place, they cannot use it. CleanBrowsing blocks Tor-related domains on filtered networks.
However, DNS blocking alone is not sufficient because:
This is why blocking Tor requires a layered approach that combines DNS, firewall rules, deep packet inspection, and endpoint controls.
When Tor Browser starts, it contacts a set of directory authority servers to get the current list of relays. There are approximately 10 directory authority servers, and their IP addresses are publicly known and rarely change. Blocking these IPs prevents Tor from bootstrapping its connection.
Add firewall rules to block outbound connections to the known directory authority IPs. Here is an example using iptables on Linux:
The Tor Project publishes a list of exit node IPs that is updated regularly. You can download this list and use it in your firewall rules. Sources include:
Important: Tor relay and exit node IPs change frequently. Automate the download and update of these lists on a schedule (daily or more often) to maintain effectiveness.
Even with directory authority and exit node IPs blocked, Tor can still connect through bridges and pluggable transports that disguise traffic. Deep Packet Inspection (DPI) can identify Tor traffic patterns regardless of the destination IP.
DPI examines traffic at the application layer and can identify Tor's distinctive TLS handshake patterns, even when running on standard ports like 443. Enterprise-grade firewalls with DPI capabilities include:
| Platform | Tor Detection Feature |
|---|---|
| Palo Alto Networks | App-ID signatures for Tor and Tor bridges |
| Fortinet FortiGate | Application control with Tor category |
| Cisco Firepower | Application detection for Tor traffic |
| Sophos XG/XGS | Tor application filter rules |
Tor uses pluggable transports to evade DPI. The main ones to be aware of are:
Keep your DPI signatures updated, as Tor developers continuously evolve pluggable transports to evade detection.
No single technique can fully block Tor. The most effective strategy combines multiple layers, each addressing a different aspect of Tor's connectivity. Here is a comprehensive checklist:
Remember: Blocking Tor is a best-effort strategy. Determined users with technical skills may find ways around these controls. The goal is to make casual Tor usage impractical and to detect sophisticated attempts through monitoring and alerting.
For more details, see: How to Block the Tor Network (DNS & Firewall)