[tor-talk] Tor on OpenBSD 5.6

Seth list at sysfu.com
Mon Mar 23 08:10:29 UTC 2015


On Sun, 22 Mar 2015 23:42:55 -0700, davidx <drhardy84 at gmail.com> wrote:
> There were no specific download instructions for BSD on the Tor download
> page that I noticed.  The header is for Linux and BSD there.  I would  
> gladly
> write them up if I can get this to work.

Forgot to add that the source version of tor does not install a service  
script in /etc/rc.d.

So create one like this

$ sudo vi /etc/rc.d/tor
-------------
#!/bin/sh
#
# $OpenBSD: tor.rc,v 1.1 2011/03/11 06:49:55 ajacoutot Exp $

ulimit -n 4096
daemon="/usr/local/bin/tor"

. /etc/rc.d/rc.subr

rc_cmd $1
-------------
Then make it executable

$ sudo chmod +x /etc/rc.d/tor

Plus you'll probably want to add a dedicated tor user.

Sometimes I just cheat on that step by adding the outdated tor package  
then deleting it, the user will be left behind.

$ sudo pkg_add tor; sudo pkg_delete tor

also you'll probably need to create a data directory and log file for tor:

$ sudo mkdir /var/tor; sudo touch /var/log/tor; sudo chmod -r _tor:_tor  
/var/tor

and add these lines to /etc/tor/torrc
--------------------------------------
Log debug file /var/log/tor
RunAsDaemon 1
DataDirectory /var/tor
User _tor
--------------------------------------


More information about the tor-talk mailing list