Datasheet
Use Metarouter to Implement Tor Anonymity Software
40
add chain=dstnat in-interface=ether1 protocol=tcp dst-port=8118 \
action=dst-nat to-addresses=10.192.168.2 to-ports=8118 disabled=no
add chain=dstnat in-interface=ether1 protocol=tcp dst-port=9050 \
action=dst-nat to-addresses=10.192.168.2 to-ports=9050 disabled=no
In this configuration, we don't want to masquerade the natBridge directly. Instead, in order to maintain anonymity,
privacy and encryption, only torBridge is masqueraded. Users may only use port 80 tcp and 53 udp by default. Ports
9050 (Tor socks proxy) and 8118 (Privoxy http proxy) are also available in order for users to configure other
services such as https or messaging. These nat rules also redirect all port 80 requests to Mikrotik transparent proxy.
Configure Mikrotik Transparent Proxy
/ip proxy set enabled=yes parent-proxy=10.192.168.2 parent-proxy-port=8118 \
cache-on-disk=no max-fresh-time=1h
Configure Hotspot (optional)
/ip hotspot
add name="Tor" address-pool=nat-DHCP interface=natBridge idle-timeout=20m disabled=no
/ip hotspot user profile
set default keepalive-timeout=5m shared-users=1000 transparent-proxy=yes \
rate-limit=512k/1024k
/ip hotspot user
add comment="" disabled=no name=tor password=tor profile=default
/ip hotspot walled-garden
add action=allow comment="" disabled=no dst-host=*.torproject.org
add action=allow comment="" disabled=no dst-host=*.eff.org
/ip dns
set servers=10.192.168.2
These commands are optional and will set up hotspot for Tor access with username tor password tor and bandwidth
limiting set to 512kbps down and 1024kbps up. Hotspot login page files with a standard accept button are avilable
here
[4]
. Also, if DNS server is not already configured, it should be set at this time.
Mikrotik Metarouter Configuration
Obtain Tor Metarouter image via download link
Download the metarouter image from the download link
[5]
and upload the image to the router's root directory.
Import Metarouter image
/metarouter import-image memory-size=32 file-name=openwrt-22250-tor-image.tar.gz
After uploading the .tar.gz file to the root directory, this command will import and start the metarouter image.
Configure Metarouter name and network interface
/metarouter set 0 name=tor
/metarouter interface add type=dynamic dynamic-bridge=torBridge virtual-machine=tor










