Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.

Running a Tor relay

jsha edited this page Dec 9, 2014 · 2 revisions

In order to run a Tor relay on a machine inside your network, you need to forward some ports to it. Note: It is possible to run a relay directly on your OpenWireless router, but the Tor Project has said that home routers are generally underpowered and do not make good relays.

Here are some details sent to the OpenWireless mailing list by a contributor who set up a server connected to their OpenWireless router to run a Tor relay. They include setting up a static IP on the server:

  • To assign a static IP
    • edited /etc/config/dhcp on the router and, in the "config dhcp 'se00'" section, changed "option start '2'" to "option start '3'" and "option limit '26'" to "option limit '25'".
    • set the IPv4 settings on the server for the wired interface to address 172.30.42.2, netmask 255.255.255.224, gateway 172.30.42.1, and DNS server 172.30.42.1.
  • To forward Tor traffic
    • added the following lines to /etc/firewall.user:
iptables -I PREROUTING -t nat -i ge00 -p tcp --dport 9001 -j DNAT --to 172.30.42.2:9001
iptables -I FORWARD -p tcp -d 172.30.42.2 --dport 9001 -j ACCEPT

iptables -I PREROUTING -t nat -i ge00 -p tcp --dport 9030 -j DNAT --to 172.30.42.2:9030
iptables -I FORWARD -p tcp -d 172.30.42.2 --dport 9030 -j ACCEPT

Clone this wiki locally