How to block Tor exit node IP addresses
Tor exit nodes are the final point for the Tor network to connect with the internet. As Tor network traffic isn’t encrypted anymore, data being accessed can become visible to the node and possibly result in security concerns or even malicious traffic.
Azion provides the Azion IP Tor Exit Nodes network list to all users registered with Azion. This list can be used to configure a behavior using Rules Engine to block all requests coming from IPs contained in the network list.
Go to Network Lists referenceTo create a rule:
- Access Azion Console > Edge Firewall.
- Select the edge firewall in which you want to configure the rule.
- Click the Rules Engine tab.
- Click the + Rule button.
- Give your rule a name and, optionally, a description.
- In the Criteria section, select the
Network
variable. - As a comparison operator, select matches.
- As an argument, select the
Azion IP Tor Exit Nodes
list. - In the Behaviors section, select Drop (Close Without Response) from the behavior list.
- Click the Save button.
If your application receives a request generated from an IP that is in the list, the edge firewall will drop the request.
To create a rule:
- Access Real-Time Manager (RTM) > Edge Firewall.
- Select the edge firewall in which you want to configure the rule.
- Click the Rules Engine tab.
- Click the New Rule button.
- Give your rule a name and, optionally, a description.
- In the Criteria section, select the
Network
variable. - As a comparison operator, select matches.
- As an argument, select the
Azion IP Tor Exit Nodes
list. - In the Behaviors section, select Drop (Close Without Response) from the behavior list.
- Click the Save button.
If your application receives a request generated from an IP that is in the list, the edge firewall will drop the request.
- Run the following
GET
request to retrieve theid
of the Azion IP Tor Exit Nodes list:
- You’ll receive a response similar to this:
- Run the following
POST
request in your terminal, replacing[TOKEN VALUE]
with your personal token, the<edge_firewall_id>
variable with your edge firewall ID, and the<network_list_id>
value with the IP Tor Exit Nodes list ID:
Key | Description |
---|---|
name | Name of the rule |
behaviors | Array that stores objects that define behaviors |
criteria | Array that stores objects that define criteria |
See the Azion API documentation to find out more about criteria and behavior objects.
- You’ll receive the following response:
- Wait a few minutes for the changes to propagate.
If your application receives a request generated from an IP that is in the list, the edge firewall will drop the request.