In case anyone is interested in running two Tor instances (regular, bridge, relay, exit) on one machine, I've successfully made an init.d script to do just that. From searches on Google it looks like others have asked about this in the past, so I'm sharing this for them. Tor only allows two Tor instances per IP. When the TBB came with Vidalia it was much easier to casually run a couple of relays per IP, but with the service it's a bit more tricky. Nevertheless it is possible:
Instructions are here: https://gist.github.com/Jesse-V/11007048 Tor should be stopped and be sure to make a backup of /etc/init.d/tor before doing this in case things go south. Be sure to set up the folders and separate torrc file before replacing the /etc/init.d/tor script. The commands will be the same as before, so "service tor start" launches both. The script is a fork of the one that's packaged with Tor 0.2.4.21.
Use your own judgment with this, but I'm just posting this for anyone interested.
Jesse V.
Jesse,
Thank you for that. I think I can implement it now but I couldn't have set-up second Tor instances without help.
The question to my mind is at what point is it better to use a fast connection for two Tor instances? Isn't it always better to have faster relays rather than more relays?
Robert
In case anyone is interested in running two Tor instances (regular, bridge, relay, exit) on one machine, I've successfully made an init.d script to do just that. From searches on Google it looks like others have asked about this in the past, so I'm sharing this for them. Tor only allows two Tor instances per IP. When the TBB came with Vidalia it was much easier to casually run a couple of relays per IP, but with the service it's a bit more tricky. Nevertheless it is possible:
Instructions are here: https://gist.github.com/Jesse-V/11007048 Tor should be stopped and be sure to make a backup of /etc/init.d/tor before doing this in case things go south. Be sure to set up the folders and separate torrc file before replacing the /etc/init.d/tor script. The commands will be the same as before, so "service tor start" launches both. The script is a fork of the one that's packaged with Tor 0.2.4.21.
Use your own judgment with this, but I'm just posting this for anyone interested.
Jesse V.
Hi Jesse,
We use a modified init script that allows for an arbitrary number of Tor instances (eg. on our bridge servers, we run 253 Tor processes in parallel).
https://lists.torproject.org/pipermail/tor-relays/2014-February/003942.html
https://www.torservers.net/wiki/setup/server#high_bandwidth_tweaks_100_mbps
Jesse,
What's the test that there are two instances running? top? Are they visible in arm?
Robert
AFAIK, arm connects to the control port of a single instance at a time. You would have to configure different ControlPort settings for each instance and connect to them one by one.
I posted this multi-instance script a short while ago: https://gist.github.com/7adietri/9122199
It's very close to the official init script (for easier maintenance), so you can just invoke "service tor status" and get a line for each instance.
Best regards, Alexander --- PGP Key: 0xC55A356B | https://dietrich.cx/pgp
On 2014-04-18 11:19, I wrote:
Jesse,
What's the test that there are two instances running? top? Are they visible in arm?
Robert
tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
I hope my Tor Ansible role will be useful to relay operators: https://github.com/david415/ansible-tor
You can use it to write many different types of playbooks for installing/configuring tor on one or more servers. In the github readme I show several example playbooks to configure tor in various ways including multiple tor instances on the same machine, obfsproxy bridges and configuring tor hidden services.
In the case of multiple tor processes per machine I am not using any init script... but instead set reasonable defaults in each torrc for User, PidFile, Log and DataDirectory.
One of the reasons that Ansible is great is that the only requirement for Ansible to run is ssh access (authorized_keys) with sudo nopasswd. Actually that's not true because some Ansible modules need certain python modules... but that's easy to deal with. Ansible tasks are meant to be idempotent operations. By default ansible will execute each task in parallel on a group of hosts... and will not proceed with the next task until all hosts in the group are in the same state.
On Fri, Apr 18, 2014 at 10:01 AM, Alexander Dietrich alexander@dietrich.cx wrote:
AFAIK, arm connects to the control port of a single instance at a time. You would have to configure different ControlPort settings for each instance and connect to them one by one.
I posted this multi-instance script a short while ago: https://gist.github.com/7adietri/9122199
It's very close to the official init script (for easier maintenance), so you can just invoke "service tor status" and get a line for each instance.
Best regards, Alexander
PGP Key: 0xC55A356B | https://dietrich.cx/pgp
On 2014-04-18 11:19, I wrote:
Jesse,
What's the test that there are two instances running? top? Are they visible in arm?
Robert
tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
tor-relays@lists.torproject.org