<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi there…<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>1<sup>st</sup> post (I figured after years of donating to EFF, I should run a tor relay). I’ve searched and read many posts on tor-relays and the best Windows Tor Server Guide I found was this below one by Rafael Rodriguez. A few questions, and apologies if they seem silly, but there is scant info out there for us Windows admins.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- is a web server needed?<o:p></o:p></p><p class=MsoNormal>- the below email post had the slashes stripped from the path entries which makes it tricky to follow (talk about an annoying mail-list process). Overall, throw all the files in a single dir?<o:p></o:p></p><p class=MsoNormal>- before I load it as a service, once all files and config the “torrc” can I just launch the tor.exe and then test it’s working?<o:p></o:p></p><p class=MsoNormal>- is this the only way to run a relay on Windows? Hoping there’s a special approach to simplify the process (now I know why there aren’t more of them).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>-Ben<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Rafael Rodriguez rafaelr at icctek.com<o:p></o:p></p><p class=MsoNormal>Wed Nov 5 00:47:46 UTC 2014<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    Previous message: [tor-relays] Windows Tor Server Guide<o:p></o:p></p><p class=MsoNormal>    Next message: [tor-relays] Windows Tor Server Guide<o:p></o:p></p><p class=MsoNormal>    Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi, here is it. Please, feel free to contribute to it. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>RUNNING A TOR SERVER IN WINDOWS <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- Download latest Tor Browser Bundle.<o:p></o:p></p><p class=MsoNormal>- Install to c:tor<o:p></o:p></p><p class=MsoNormal>- Create a temporary folder on your Desktop and name it "server".<o:p></o:p></p><p class=MsoNormal>- Copy all files from C:TorBrowserTorBrowserDataTor to the "server"<o:p></o:p></p><p class=MsoNormal>folder on the Desktop.<o:p></o:p></p><p class=MsoNormal>- Browse to C:TorBrowserTorBrowserTor; delete the folder<o:p></o:p></p><p class=MsoNormal>"PluggableTransports" and it content.<o:p></o:p></p><p class=MsoNormal>- Copy all files from C:TorBrowserTorBrowserTor to the "server" folder<o:p></o:p></p><p class=MsoNormal>on the Desktop.<o:p></o:p></p><p class=MsoNormal>- Browse to C:Tor and delete everything inside that folder. C:Tor should<o:p></o:p></p><p class=MsoNormal>be completely empty at this point.<o:p></o:p></p><p class=MsoNormal>- Move all files from the "server" folder on your Desktop to C:Tor<o:p></o:p></p><p class=MsoNormal>- Browse to C:Tor and create a new folder named "datadir".<o:p></o:p></p><p class=MsoNormal>- Create a new text file in C:Tor named "notices" (I myself use<o:p></o:p></p><p class=MsoNormal>notices.log but we want to keep it simple for users who may not know how<o:p></o:p></p><p class=MsoNormal>to change the file extension from .txt to .log)<o:p></o:p></p><p class=MsoNormal>- EDIT C:TORTORRC FILE: (this could be the torrc-defaults file and all<o:p></o:p></p><p class=MsoNormal>its comments). Note that the sample below is just for references. Each<o:p></o:p></p><p class=MsoNormal>user needs to define her/his own parameters based on their own needs and<o:p></o:p></p><p class=MsoNormal>that's impossible for me to cover in a single file for everyone. Hence,<o:p></o:p></p><p class=MsoNormal>each parameter should be included in the torrc-defaults with due<o:p></o:p></p><p class=MsoNormal>comments to be used as reference. Also, noted that I'm using IPv4 geoip<o:p></o:p></p><p class=MsoNormal>by default. Users using IPv6 should define geoip6 in their torrc file.<o:p></o:p></p><p class=MsoNormal>Then again, I cannot use a single sample file for all deployments. The<o:p></o:p></p><p class=MsoNormal>defaults file should be used as reference once again. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>DATADIRECTORY .DATADIR<o:p></o:p></p><p class=MsoNormal>LOG NOTICE FILE .NOTICES.TXT<o:p></o:p></p><p class=MsoNormal>GEOIPFILE .GEOIP<o:p></o:p></p><p class=MsoNormal>AvoidDiskWrites 1<o:p></o:p></p><p class=MsoNormal>SocksPort 0<o:p></o:p></p><p class=MsoNormal>ORPort 9001<o:p></o:p></p><p class=MsoNormal>DirPort 9030<o:p></o:p></p><p class=MsoNormal>ExitPolicy reject *:*<o:p></o:p></p><p class=MsoNormal>Nickname <o:p></o:p></p><p class=MsoNormal>RelayBandwidthRate <o:p></o:p></p><p class=MsoNormal>RelayBandwidthBurst<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Up until this point, all I've written is nothing more than using the<o:p></o:p></p><p class=MsoNormal>default Tor Bundle to create a "Server" package. All steps above could<o:p></o:p></p><p class=MsoNormal>be made easier for users if a "Tor Windows Server" package was available<o:p></o:p></p><p class=MsoNormal>for download on the Tor Project or somewhere else. I refuse the idea of<o:p></o:p></p><p class=MsoNormal>creating such package myself to distribute it since many packages could<o:p></o:p></p><p class=MsoNormal>start floating on the net and bad intentioned people could bundle them<o:p></o:p></p><p class=MsoNormal>with arbitrary code, viruses and so on. A Windows Installer package can<o:p></o:p></p><p class=MsoNormal>be built for distribution though. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Next, I will address the two main things we need to run tor as a Windows<o:p></o:p></p><p class=MsoNormal>service (server): <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>1- Install Tor as Windows Service.<o:p></o:p></p><p class=MsoNormal>2- Security (Isolating the Tor service). <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>INSTALL TOR AS WINDOWS SERVICE <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I personally use nssm [2] (Non-Sucking Service Manager) myself to<o:p></o:p></p><p class=MsoNormal>register the service but feel free to use default Windows tools for<o:p></o:p></p><p class=MsoNormal>registering Tor service if you believe so. Anyways, irrespective the<o:p></o:p></p><p class=MsoNormal>tool used to register the Tor service, we just need the following: <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Service: C:Tortor.exe<o:p></o:p></p><p class=MsoNormal>Name: TorServer<o:p></o:p></p><p class=MsoNormal>Parameters: -f C:Tortorrc <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Start the TorServer service and everything should just work at this<o:p></o:p></p><p class=MsoNormal>point. The datadir directory will be populated with tor files once<o:p></o:p></p><p class=MsoNormal>started and the notices.txt file will also reflect so. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>SECURITY (Quick explanation - We can go into details later) <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- Create a Standard user account and name it Tor with a strong password.<o:p></o:p></p><p class=MsoNormal>- Policies: <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>1- Deny access to this computer from the network<o:p></o:p></p><p class=MsoNormal>2- Deny log on locally<o:p></o:p></p><p class=MsoNormal>3- Deny log on through Remote Desktop Services <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- NTFS Permissions for Tor windows user account: <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>1- Read/Write permissions to datadir folder<o:p></o:p></p><p class=MsoNormal>2- Read/Write permissions to notices.txt or (notices.log) file <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- Open Services, Start -> Run -> type "services.msc" without quotes,<o:p></o:p></p><p class=MsoNormal>press enter and your Services window will pop up. Scroll down and find<o:p></o:p></p><p class=MsoNormal>the TorServer service and double click it. Move to the LOG ON tab and<o:p></o:p></p><p class=MsoNormal>set the "Log on as: This account: .TOR. Enter the strong password for<o:p></o:p></p><p class=MsoNormal>the Tor user account in the password field and apply changes. Restart<o:p></o:p></p><p class=MsoNormal>the service and now Tor will be running in its own isolated/limited<o:p></o:p></p><p class=MsoNormal>account in Windows.<o:p></o:p></p></div></body></html>