Well, the solution I came up with was to create a transparent Tor proxy using a separate VM to act as a router, the virtual machine(s) used for research will then pass all traffic through Tor (with zero configuration or software, and without even being aware the proxy exists). Although the router will take about 15 minutes to set up, you can pass unlimited VMs through Tor with no extra configuration!
Here's an example of how easy it is to connect a brand new VM through tor using my setup (no proxy settings have been touched).
Router Installation
- Create a new VM how you normally would using the pfSense ISO (but don't power it on yet).
- Go into the VM settings and set the network adapter to use whichever settings you'd normally use to connect to the internet (this is usually "NAT").
- Click the "LAN segments..." button and add a new LAN segment.
- Click the "Add..." button and add a new network adapter (just leave the default settings and click finish).
- Set the new adapter to use the LAN segment you created, leaving the other adapter how it is.
Now you just need to open a browser and navigate to the LAN IP of your pfSense router (192.168.1.1 in my case) and you should be met with the following screen (login information is admin:pfsense).
You'll need to go to "Services > DNS Resolver" then uncheck "Enable DNS Resolver" and save settings (we'll use tor as our DNS resolver, allowing the system to also access .onion domains).
Tor Installation
- pkg install tor
- rm -rf /usr/local/etc/tor/torrc
DNSPort 53
DNSListenAddress YOUR_PFSENSE_LAN_IP_HERE
VirtualAddrNetworkIPv4 10.192.0.0/11
AutomapHostsOnResolve 1
RunAsDaemon 1
TransPort 9040
- touch /usr/local/etc/rc.d/tor.sh
- cd /usr/local/etc/rc.d/
- echo "/usr/local/bin/tor" >> tor.sh && chmod +x tor.sh
- /usr/local/bin/tor
Firewall Setup
- Interface: LAN (Traffic from VMs)
- Protocol: TCP
- Source: Any (All devices on the LAN)
- Destination: not LAN net (Ignore traffic between VMs or the VMs and pfSense router)
- Destination port range: from 80 to 80 (HTTP)
- Redirect Target IP: 127.0.0.1 (The pfSense router)
- Redirect target port: 9040 (The transparent proxy port we set in tor config)
- Description: Doesn't matter, put what you want.
- Action: Pass (Allow traffic matching this rule)
- Interface: LAN (Traffic from VMs)
- TCP/IP: Version: IPv4
- Protocol: TCP/UDP (DNS can be both)
- Source: LAN net (From VMs)
- Destination: (type): Single host or alias
- Destination (address): The LAN ip of your pfSense router.
- Destination port range: from 53 to 53
- Description: Allow DNS
- Action: Pass (Allow traffic matching this rule)
- Interface: LAN (Traffic from VMs)
- TCP/IP: Version: IPv4
- Protocol: TCP/UDP
- Source: LAN net (From VMs)
- Destination: LAN net (To VMs)
- Destination port range: from Any to Any
- Description: Allow VM Communication






SOCIAL SHARE CARD GENERATOR