Cybersecurity

How to Check if IP is Tor Exit Node?

Learn how to identify Tor exit nodes and understand their significance in network security, privacy, and threat detection.

By Inventive HQ Team

The quickest way to check whether an IP address is a Tor exit node is to compare it against the Tor Project's authoritative bulk exit list at https://check.torproject.org/torbulkexitlist — a plain-text file of every current IPv4 exit address, refreshed roughly hourly. A one-line check is all it takes: curl -s https://check.torproject.org/torbulkexitlist | grep -Fxq "203.0.113.10" && echo "Tor exit". For IPv6 exits or per-relay detail, query the onionoo details API (https://onionoo.torproject.org/details?search=<ip>) and look for "Exit" in the relay's flags; for a firewall or mail server, the TorDNSEL DNSBL answers the same question with a single DNS lookup.

That is the summary an AI overview gives you. What it can't give you is which method to reach for, how the official commands actually work, and what to do once an IP comes back positive — because the useful answer depends on whether you are enriching one alert, filtering live mail, or scoring every request at the edge. The rest of this article is that decision, the exact commands, and the security tradeoffs behind them.

Understanding Tor and Exit Nodes

The Tor network enables anonymous internet access by routing traffic through multiple relays that mask user identity and location. Tor exit nodes are the final relays in Tor circuits, responsible for connecting anonymized traffic to destination servers. To destination servers, traffic appears to originate from Tor exit node IPs rather than actual user IPs. Identifying Tor exit nodes helps security teams understand anonymous traffic sources and make informed access control decisions.

Tor exit nodes are a special category of IP address that warrants distinct handling. Traffic from a Tor exit node indicates either legitimate privacy protection or potential malicious activity. Understanding Tor exit node identification helps organizations balance security and privacy considerations.

The Tor Network Architecture

Understanding how Tor works helps explain exit node significance.

Onion Routing: Tor uses onion routing, encrypting traffic through multiple layers corresponding to Tor relays. Each relay only decrypts its own layer, seeing only the previous and next relay addresses, not the actual user.

Tor Circuit Construction: Tor clients construct circuits through three relays: entry guard, middle relay, and exit node. This three-relay minimum helps prevent correlation of traffic.

Entry Guards: Tor clients use persistent entry guards reducing the probability that an attacker can observe traffic entering and exiting the Tor network simultaneously.

Middle Relays: Middle relays see neither the source nor destination of traffic, providing cryptographic isolation.

Exit Nodes: Exit nodes remove the final encryption layer and forward traffic to real destination servers. Exit nodes see both encrypted incoming Tor traffic and unencrypted outgoing traffic to destinations.

Why Exit Node Identification Matters

Security teams benefit from identifying Tor exit nodes.

Threat Detection: Malicious actors use Tor for anonymity during attacks. Identifying Tor exit nodes helps detect attacks originating from Tor.

Access Control: Organizations might restrict Tor access for security or compliance reasons. Identifying exit nodes enables enforcement of such policies.

Geolocation Accuracy: Tor exit node geolocation might not reflect actual user location. Understanding exit node locations prevents location-based security logic errors.

Traffic Attribution: Understanding that traffic originates from Tor rather than direct internet helps interpret traffic patterns.

Privacy Considerations: Tor use represents legitimate privacy protection. Organizations should consider privacy implications when implementing Tor restrictions.

Identifying Tor Exit Nodes: pick a method

There are four practical ways to check an IP, and they differ in coverage, latency, and how much infrastructure you need. The flow below is the decision most teams make; the table and commands that follow give you the exact endpoint for each path.

Choosing a Tor exit-node check by use case A suspect IP flows into one of four checks — bulk exit list, onionoo API, TorDNSEL DNSBL, or commercial IP intel — each ending in a Tor or not-Tor verdict. Which Tor check should I run? Suspect IP Bulk exit list one-off / batch grep onionoo API IPv6 + relay detail TorDNSEL DNSBL live firewall / mail Commercial IP intel Tor + VPN + proxy Tor? yes / no
MethodEndpoint / sourceBest forCoverageNotes
Bulk exit listhttps://check.torproject.org/torbulkexitlistOne-off lookups, nightly batch enrichmentIPv4 exits (port 80 policy)Authoritative, free, plain text; refreshed ~hourly. Add ?ip=YOUR.IP via the CGI to scope privately.
onionoo details APIhttps://onionoo.torproject.org/details?search=<ip>Programmatic checks needing IPv6 + relay metadataIPv4 and IPv6 exitsJSON; check flags for "Exit", read exit_addresses. Filter all exits with search=flag:exit.
TorDNSEL DNSBL<rev-ip>.<port>.<rev-server-ip>.ip-port.exitlist.torproject.orgLive filtering in firewalls / mail serversIPv4 exits reachable to your hostReturns 127.0.0.2 if Tor, NXDOMAIN if not. Simplified by Tor in 2020; many now prefer the bulk list.
Commercial IP intelIPQualityScore, IP2Location, MaxMind, Spur, etc.Turnkey scoring alongside VPN/proxy signalsIPv4 + IPv6, historicalPaid API; one call also flags VPNs and datacenter proxies. Third-party refresh cadence.

The bulk exit list (the fast default)

The Tor Project maintains the authoritative directory of every relay, and exposes the exit subset as a plain-text file. This is the simplest check and the one to reach for first:

# Is a specific IP a current Tor exit?
curl -s https://check.torproject.org/torbulkexitlist | grep -Fxq "203.0.113.10" \
  && echo "Tor exit node" || echo "not a Tor exit"

# Cache the whole list locally for batch enrichment (refresh hourly)
curl -s https://check.torproject.org/torbulkexitlist -o tor-exits.txt

To query privately without exposing your visitors' addresses, ask the service which exits could reach your server: https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=YOUR.SERVER.IP. Note the list is IPv4-only and reflects nodes whose exit policy permits port 80 — since 2020 the service no longer supports arbitrary exit-policy queries.

Advertisement

The onionoo API (IPv6 and relay detail)

When you need IPv6 exits or richer per-relay data, use the onionoo protocol, which returns JSON built from the live Tor directory consensus:

# Look up one IP and see its flags (Exit means it's an exit node)
curl -s "https://onionoo.torproject.org/details?search=203.0.113.10&fields=nickname,flags,exit_addresses"

# Pull every relay carrying the Exit flag
curl -s "https://onionoo.torproject.org/details?search=flag:exit&fields=exit_addresses"

A relay whose flags array contains "Exit" is an exit node; exit_addresses lists the addresses it actually exits from, which can differ from its main OR address — and this is where IPv6 exits surface that the plain bulk list omits.

The TorDNSEL DNSBL (live filtering)

For firewalls, WAFs, and mail servers that want a check as cheap as a DNS lookup, TorDNSEL exposes a DNS blocklist. You reverse the suspect IP, append the destination port and your reversed server IP, and resolve the A record. If a Tor exit at that address can reach your server on that port, the query returns 127.0.0.2; otherwise DNS returns NXDOMAIN:

# Is 81.169.137.209 a Tor exit that can reach 1.2.3.4 on port 443?
dig +short 209.137.169.81.443.4.3.2.1.ip-port.exitlist.torproject.org
# 127.0.0.2  -> yes, Tor exit ;  NXDOMAIN -> no

dan.me.uk runs an alternative Tor DNSBL and a full node list, though it rate-limits list downloads (once every 30 minutes) — respect its limits or you'll be blocked.

Commercial IP intelligence (turnkey)

Threat-intelligence vendors — IPQualityScore, IP2Location, MaxMind, Spur, and others — expose Tor detection via API, usually bundled with VPN, proxy, and general IP reputation signals. You trade the free lists' simplicity for convenience, IPv6 coverage, historical context, and a single call that also flags VPNs and datacenter proxies. Our IP risk checker rolls several of these signals into one score so you can test an address without wiring up a feed:

Loading interactive tool...

Using the Tor Project Directory

The authoritative source for Tor relay information.

Directory Access: The Tor Project publishes directory data at consensus.dat and other directories. Raw directory data enables programmatic access to relay information.

Relay Information: Directory data includes relay fingerprints, IP addresses, exit policies, and operational characteristics.

Real-Time Updates: Directory data updates frequently (hourly consensus), reflecting current Tor network state. Using recent directory data ensures current exit node lists.

Exit Policy Analysis: Tor relays advertise exit policies indicating what traffic they permit. Some relays restrict exit traffic to specific ports or destinations.

Bandwidth Information: Directory data includes bandwidth capacity. High-capacity exit nodes might be more interesting for analysis.

Exit Policy Implications

Tor exit node policies affect network security.

Exit Policy Definition: Tor nodes advertise exit policies specifying what traffic destinations they permit. A node might permit HTTP traffic but block SMTP.

Default Policies: Many Tor nodes use default exit policies. Common defaults restrict certain ports like SMTP (25) to reduce spam.

Restrictive Policies: Some exit nodes use very restrictive policies, only supporting HTTPS traffic. These exit nodes carry lower risk of hosting malicious traffic.

Open Policies: Some exit nodes permit most traffic. Open policies mean exit nodes might facilitate various attack types.

Policy Inspection: Examining exit node policies helps assess risk. High-risk traffic types from open-policy nodes warrant additional attention.

Integrating Exit Node Detection

Practical integration of exit node detection into security operations.

Firewall Rules: Firewalls can block or flag traffic from known exit nodes. Exit node lists can be converted to firewall rules blocking traffic.

SIEM Integration: SIEM systems can flag alerts involving exit node IPs. Exit node intelligence enriches security events.

WAF Implementation: Web application firewalls can detect exit node traffic. Traffic from exit nodes might trigger additional verification.

Email Security: Email gateways can flag mail from exit node IPs. This helps detect mail sent through Tor proxies.

Automated Response: High-risk applications might block exit node traffic automatically. Lower-risk applications might allow it with additional logging.

Challenges of Exit Node Detection

Exit node detection has practical challenges.

Frequent Changes: Exit node IPs change as nodes join and leave the Tor network. Lists require frequent updates to remain current.

New Exit Nodes: Newly launched exit nodes might not yet appear in public lists. There's inherent lag between node launch and public recognition.

Abandoned Nodes: Exit nodes that cease operation take time to be removed from lists. Lists contain stale entries requiring cleanup.

False Positives: IPs briefly operating as exit nodes before ceasing are retained in lists, potentially blocking legitimate non-Tor traffic from those IPs.

VPN vs. Tor Confusion: Some VPN and proxy IPs might be confused with Tor IPs without careful analysis.

Legitimate Tor Uses

Understanding legitimate Tor uses guides appropriate responses.

Privacy Protection: Journalists, activists, and ordinary users protect privacy using Tor. Tor provides legitimate privacy protection.

Circumvention: Users in countries with internet restrictions use Tor to access unrestricted internet. Tor circumvention is legitimate in many contexts.

Anonymous Reporting: Whistleblowers and abuse reporters use Tor for anonymous reporting. Supporting anonymous reporting is ethically important.

Research: Security researchers use Tor for research purposes. Tor provides research infrastructure for studying internet security.

Malicious Tor Uses

Understanding malicious Tor uses guides security decision-making.

Malware Distribution: Exit nodes sometimes distribute malware. Traffic interception or MITM attacks can inject malware.

Credential Theft: Malicious exit node operators might intercept unencrypted traffic to steal credentials. This risk motivates HTTPS use.

Attack Launching: Tor provides anonymity for launching attacks. Attack traffic obscured by Tor complicates attribution.

Command and Control: Some malware uses Tor for C2 communications, hidden from ISP monitoring.

Tor and Encryption

HTTPS and similar encryption provides additional protection even through Tor exit nodes.

End-to-End Encryption: HTTPS encryption between client and server continues through Tor exit nodes. Exit nodes see only encrypted traffic, not content.

Unencrypted Traffic Risk: Unencrypted HTTP traffic through Tor exit nodes exposes content to exit node operators. This risk motivates HTTPS use.

DNS Leaks: Tor traffic might leak DNS queries revealing destinations. Preventing DNS leaks is important for Tor users.

Exit Node Encryption: Some projects encrypt traffic even between Tor exit nodes and destinations. Double encryption prevents exit node eavesdropping.

Geographic Considerations

Tor exit node distribution has geographic implications.

Geographic Distribution: Tor exit nodes are distributed globally. Exit node geolocation indicates traffic apparent origin.

Jurisdiction Variance: Different jurisdictions have different legal responsibilities for Tor nodes. Node operators in different jurisdictions face different legal risks.

Regional Restrictions: Some regions restrict or ban Tor. Understanding regional variations helps comply with local regulations.

Geolocation Accuracy: Exit node geolocation might not reflect actual user location. Users might select exit nodes in specific countries for content access.

Privacy and Ethical Considerations

Tor exit node detection raises important privacy and ethical considerations.

Privacy vs. Security: Blocking Tor enables security benefits but eliminates privacy protections. Organizations must balance legitimate security needs against privacy rights.

Circumvention Support: Supporting Tor access enables circumvention of internet censorship. Ethical considerations should account for this benefit.

Legal Compliance: In jurisdictions restricting Tor, compliance requirements might conflict with privacy principles.

Transparency: Organizations implementing Tor restrictions should transparently communicate policies to users.

Tools for Exit Node Detection

Several tools and services help identify exit nodes.

Dan.me.uk Tor Exit IP List: Comprehensive list of exit nodes updated regularly.

The Tor Project Directory: Official authoritative source for relay information.

Threat Intelligence Feeds: MISP and similar feeds include Tor exit data.

Custom Scripts: Organizations can build custom detection using Tor directory APIs.

Commercial Tools: Security vendors provide Tor detection integrated with other threat detection.

Conclusion

Identifying Tor exit nodes helps security teams understand traffic origins and make informed policy decisions. The Tor Project directory provides authoritative exit node lists updated regularly. Exit node identification enables firewall rules, alert enrichment, and access control decisions. Understanding legitimate Tor uses (privacy, circumvention, research) guides appropriate responses balancing security with privacy. Exit node detection faces challenges including frequent changes and lag in list updates. Organizations implementing Tor restrictions should carefully consider privacy implications and ensure policies align with organizational values and legal requirements. By understanding Tor exit nodes and proper detection techniques, security teams can integrate Tor awareness into security operations while respecting legitimate privacy needs.

Frequently Asked Questions

How do I check if an IP address is a Tor exit node?

Compare the IP against an authoritative Tor exit list. The fastest method is the Tor Project's bulk exit list at https://check.torproject.org/torbulkexitlist, a plain-text file of every current IPv4 exit address, refreshed roughly hourly. Download it and grep for the IP: curl -s https://check.torproject.org/torbulkexitlist | grep -Fxq "203.0.113.10" && echo TOR. For IPv6 exits or richer metadata, query the onionoo API at https://onionoo.torproject.org/details?search=203.0.113.10 and look for "Exit" in the relay's flags. For a firewall or mail server, the TorDNSEL DNSBL lets you test a single IP with a DNS query.

What is the official Tor exit node list URL?

The Tor Project publishes the authoritative bulk exit list at https://check.torproject.org/torbulkexitlist. It returns a newline-separated list of IPv4 addresses that are currently exit relays permitting connections to port 80. You can scope it to nodes that could reach a specific server of yours with https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=YOUR.SERVER.IP, which lets you query privately without disclosing your visitors' addresses. The onionoo details API is the companion source for IPv6 exits and per-relay detail.

How does the TorDNSEL DNSBL query work?

TorDNSEL is a DNS blocklist interface. You build a hostname from the reversed suspect IP, the destination port, and the reversed IP of your own server, ending in .ip-port.exitlist.torproject.org, then resolve its A record. If the suspect IP is a Tor exit that can reach your server on that port, the query returns 127.0.0.2; if it is not, DNS returns NXDOMAIN. This makes Tor detection as cheap as a DNS lookup, which is why mail servers and firewalls favour it. Note the Tor Project simplified this service in 2020, so many operators now prefer the bulk list or onionoo.

What is the onionoo API and how do I use it to find exit nodes?

Onionoo is the Tor Project's web protocol for querying live relay data. You send an HTTP GET to https://onionoo.torproject.org/details and it returns JSON describing relays and bridges. Filter to exits with ?search=flag:exit, look up a single address with ?search=<ip>, or trim the response with &fields=exit_addresses,flags. Each relay object contains a flags array; a value of "Exit" means it acts as an exit node. Onionoo includes both IPv4 and IPv6 exit addresses, which the plain bulk list does not.

How often do Tor exit node IPs change?

Constantly. Relays join and leave the network continuously, and the Tor directory publishes a fresh consensus roughly every hour. Any exit list you cache is stale within hours, so detection must pull an updated list on a schedule (hourly is typical) rather than hard-coding addresses. Newly launched exits also lag public lists, and decommissioned nodes linger for a while, so no single list is ever perfectly complete.

Should I block all Tor exit node traffic?

Not automatically. Tor carries legitimate traffic from journalists, activists, researchers, and privacy-conscious users, as well as attackers. A blanket block trades away real users for a modest security gain. The common middle ground is risk-based: allow Tor for low-risk read-only pages, add friction (extra verification, rate limits, no account creation) for sensitive actions, and reserve hard blocks for the highest-risk endpoints. Flagging and logging Tor traffic in your SIEM is almost always better than silently dropping it.

Can commercial IP intelligence services detect Tor?

Yes. Providers such as IPQualityScore, IP2Location, MaxMind, and Spur expose Tor exit detection through their APIs, usually bundled with VPN, proxy, and general IP-reputation signals. They trade the free lists' simplicity for convenience, IPv6 coverage, historical data, and a single call that also flags VPNs and datacenter proxies. The tradeoff is cost and reliance on a third party's refresh cadence, versus the free, authoritative, but bare-bones lists the Tor Project publishes.

Why is a Tor exit node's geolocation unreliable?

Because the exit node's location tells you nothing about the actual user. Traffic appears to originate from the exit relay's IP, so IP geolocation returns the country of the exit node, not the person behind three encrypted hops. A user in one country routinely exits through a relay in another, sometimes chosen deliberately. Any security or content logic that trusts the geolocation of a Tor exit IP is reasoning about the wrong location entirely.

What is the difference between a Tor exit node and a VPN?

A VPN routes your traffic through a single provider-operated server, so the provider can see your real IP and your destination. Tor routes through at least three volunteer-run relays, and no single relay knows both your identity and your destination; the exit node sees your traffic's destination but not your IP. For detection, VPN endpoints tend to be stable datacenter ranges, while Tor exits are a public, hourly-changing list you can verify against the Tor Project directly. Both often show up together in commercial anonymizer-detection feeds.

Tor networkexit nodesthreat detectionprivacy technology