Heitor Gouvêa

Research About


Host-based anonymous networking via transparent Tor redirection

Table of contents:


Abstract

Ensuring network anonymity typically relies on application-level solutions such as the Tor Browser, which only protect traffic generated by specific programs. This approach leaves other applications and system services exposed to direct network communication, potentially leaking identifying information. In this work, we present a host-based architecture for anonymous networking that transparently enforces Tor routing for all outbound system traffic. The proposed approach redirects network traffic at the operating system level using firewall-based traffic interception, ensuring that all communications are routed through the Tor network without requiring application-level configuration. We implement this architecture in an open-source prototype called Nipe, a lightweight engine that configures system-level routing policies to enforce Tor as the default gateway. Our evaluation demonstrates that the architecture effectively prevents direct traffic leaks while maintaining compatibility with common Linux applications. The results suggest that host-based transparent routing provides a practical and deployable mechanism for improving system-wide network anonymity.

Introduction

Network anonymity has become an important requirement for users seeking privacy, censorship resistance, and protection against network surveillance. Systems such as the Tor network provide strong anonymity guarantees by routing traffic through multiple relays before reaching its destination [1]. However, in practice, Tor usage is often limited to specific applications, most notably the Tor Browser. This application-centric model presents a significant limitation: traffic generated by other applications or system services may bypass the anonymity network entirely. Background services, software updates, and command-line tools may connect directly to the internet, potentially revealing identifying information such as the user’s IP address or DNS requests.

To address this limitation, anonymity enforcement can be shifted from the application layer to the host level. Instead of relying on individual programs to route traffic through Tor, the operating system itself can enforce routing policies that ensure all outbound traffic passes through the anonymity network. In this paper, we propose a host-based anonymous networking architecture based on transparent Tor traffic redirection. The architecture intercepts outbound network traffic at the system level and redirects it through the Tor network using firewall-based routing mechanisms. We implement the proposed architecture through Nipe, an open-source tool that configures system routing and firewall policies to enforce Tor as the default network gateway.

The main contributions of this work are:

  • A host-based architecture for transparent anonymous networking.
  • A practical implementation that enforces Tor routing at the system level.
  • An evaluation demonstrating the effectiveness of the approach in preventing direct traffic leaks.
  • A discussion of limitations and deployment considerations for host-based anonymity enforcement.

Background

2.1 The Tor network

Tor is a widely used anonymity network that enables users to conceal their identity by routing traffic through a series of relays [1]. Each relay only knows the previous and next hop in the circuit, preventing any single entity from linking the user to the destination. Traffic entering the Tor network is encrypted in multiple layers, forming what is commonly known as onion routing, a technique originally proposed by Reed et al. [2]. While Tor provides strong anonymity guarantees, its effectiveness depends on whether applications actually use the Tor network for their communications.

2.2 Application-level anonymity

The most common method for using Tor is through application-level integration, where specific applications are configured to use a Tor SOCKS proxy. The Tor Browser is a prominent example of this model. However, this approach presents several limitations:

Only configured applications use Tor. System services may bypass the anonymity network. Users must manually configure individual applications. Misconfigurations may lead to information leakage. Previous research has shown that application misconfiguration and protocol leaks can compromise anonymity even when Tor is used [3].

2.3 Host-based traffic enforcement

Host-based traffic enforcement refers to mechanisms that operate at the operating system level to control how network traffic is routed. On Linux systems, tools such as iptables or nftables allow administrators to intercept, modify, or redirect network traffic through firewall policies [4]. By combining firewall rules with Tor’s transparent proxy capabilities, it becomes possible to automatically redirect outbound traffic into the Tor network.

Threat model

The architecture presented in this work aims to protect users against adversaries capable of observing network traffic between the host and external services. We assume the following:

  1. The adversary can observe direct internet connections originating from the user’s IP address.
  2. The adversary may analyze DNS requests to identify visited services.
  3. Applications running on the host may not be Tor-aware. 3/ This threat model is consistent with commonly studied adversaries in anonymity network research [1].

The system aims to prevent:

  1. Direct outbound connections bypassing Tor.
  2. DNS leaks revealing target domains.
  3. Application misconfiguration leading to traffic exposure.

We do not attempt to defend against:

  1. Global passive adversaries capable of monitoring the entire Tor network [1].
  2. Endpoint compromise or malware on the host.
  3. Traffic correlation attacks at the network level.

Host-based anonymous networking architecture

The proposed architecture enforces anonymous networking at the host level by transparently redirecting all outbound traffic through the Tor network. The architecture consists of four main components: Traffic Interception Layer Firewall Enforcement Rules Tor Transparent Proxy Routing Control Interface

Figure 1. Host-based anonymous networking architecture implemented by Nipe.

4.1 Traffic interception

Outbound network packets generated by applications are intercepted by the operating system’s firewall subsystem. Firewall rules identify outbound traffic and apply redirection policies that forward packets to the Tor transparent proxy. Such interception techniques are commonly used in transparent proxy architectures [4].

4.2 Transparent Tor routing

Tor provides a Transparent Proxy mode, allowing traffic to be routed through the network without application-level proxy configuration [5]. Intercepted packets are redirected to Tor’s TransPort, which encapsulates them within Tor circuits and forwards them through the anonymity network.

4.3 DNS handling

To prevent DNS leaks, the architecture redirects DNS requests to Tor’s DNSPort. This ensures that domain name resolution occurs within the Tor network rather than through the host’s default resolver. DNS leakage has been identified as a major anonymity risk in network privacy systems [3].

4.4 System enforcement

The architecture enforces strict routing policies to prevent traffic from bypassing the Tor network. These policies include: Blocking outbound traffic that does not pass through Tor Restricting non-Tor DNS requests Allowing exceptions for Tor relay connections This enforcement ensures that applications cannot accidentally expose identifying information.

Implementation

We implement the proposed architecture through Nipe, an open-source engine designed to configure and manage transparent Tor routing on Linux systems. Nipe automates the process of: Starting and monitoring the Tor service Configuring firewall rules Redirecting outbound traffic to Tor Preventing DNS leaks Verifying Tor connectivity The implementation relies on standard Linux networking tools and does not require kernel modifications. Key characteristics of the implementation include: Minimal system overhead Compatibility with common Linux distributions Automatic configuration of firewall rules Simple command-line interface

Reproducibility

To support reproducibility and facilitate further research, the implementation described in this work is publicly available as an open-source project. The prototype used to implement the host-based anonymous networking architecture presented in this paper is Nipe, a lightweight engine designed to enforce transparent Tor routing at the system level.

The source code, documentation, and usage instructions can be accessed at:

https://github.com/htrgouvea/nipe

Figure 2. Nipe demo showing transparent Tor-based routing in practice.

The repository contains the scripts and configuration logic required to configure firewall-based traffic interception and redirect outbound connections through the Tor network. Researchers and practitioners can reproduce the architecture described in this paper by deploying the tool on a Linux system with the Tor service installed.

The open-source nature of the implementation enables independent verification, experimentation, and extension of the proposed approach. Future work may build upon this implementation to evaluate additional network configurations, alternative firewall frameworks, or improved anonymity enforcement mechanisms.

Evaluation

We evaluate the proposed architecture in three dimensions: Traffic leak prevention Compatibility with Applications Performance Overhead

6.1 Traffic leak prevention

We tested the system against common leak scenarios including: Direct HTTP requests DNS resolution attempts Background application traffic In all cases, outbound connections were successfully routed through the Tor network, preventing direct IP exposure.

6.2 Application compatibility

The architecture was tested with common command-line and graphical applications, including: Web browsers Package managers Network utilities Messaging clients Applications operated without modification, demonstrating the benefits of transparent routing.

6.3 Performance

Routing traffic through Tor introduces additional latency due to multi-hop routing [1]. However, the overhead introduced by the host-level enforcement mechanism itself was negligible.

Limitations

Despite its advantages, the proposed approach has several limitations.

Tor’s inherent latency may impact performance-sensitive applications. Additionally, certain protocols may not function correctly over Tor due to network restrictions. Applications that use custom networking stacks or raw sockets may bypass firewall rules under certain conditions. Finally, the architecture does not protect against endpoint compromise or advanced traffic correlation attacks [1].

Several systems have explored approaches to anonymous networking. The Tor Browser provides application-level anonymity through browser hardening and network routing [6]. Operating systems such as Tails provide system-wide anonymity by routing traffic through Tor. However, these solutions require dedicated environments rather than operating within existing systems [7]. Our approach differs by providing host-level enforcement that can be deployed on standard Linux systems.

Conclusion

This paper presented a host-based architecture for anonymous networking based on transparent Tor traffic redirection. By enforcing routing policies at the operating system level, the proposed approach ensures that all outbound traffic is automatically routed through the Tor network. We implemented the architecture through an open-source prototype called Nipe and demonstrated its effectiveness in preventing traffic leaks while maintaining compatibility with existing applications.

Host-based anonymity enforcement represents a practical step toward improving privacy for users who require system-wide protection rather than application-specific anonymity.

References