[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-talk] NT Service installation does not handle ``bridge relay'' option in torrc file
On Sep 19, 2011, at 12:00 PM, Moses wrote:
> I'm trying to run a Tor bridge relay. I added following lines to the torrc file:
> SocksPort 0
> ORPort 993
> BridgeRelay 1
> Exitpolicy reject *:*
> then run tor in normal mode (not as a NT service), everything works
> fine, I can telnet this bridge from another computer by:
> telnet xxx.xxx.xxx.xxx 993
> But when I try to run Tor bridge as a NT service,
> c:\tor> tor --service start
> the prompts says the service started successfully, local tor port 9050
> also seems works fine.
> But I can not telnet it from another computer, telnet xxx.xxx.xxx.xxx
> 993 will return a timeout error.
Windows uses a special account, with it's own home directory and separate set of environmental variables, to run NT services. Odds are, when you start the service, tor has no idea where your torrc is, and is dropping to "reasonable default" values. This is why the default ORPort of 9050 is being used.
The trick is declaring a path to the torrc you want to use in the service invocation (using the -f flag), making sure the SERVICE account has permission to read the torrc (which could be an issue if it's in one of your personal home folders), and making sure DataDirectory is declared in your torrc (to ensure the same keys are being used every time).
This is covered in a bit more detail in this archive thread: https://lists.torproject.org/pipermail/tor-relays/2010-June/000381.html
tor-talk mailing list