1

I am on Linux Debian Stretch 9.

I just noticed there is probably one file read before my torrc file:

/usr/share/tor/tor-service-defaults-torrc

with content:

DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
RunAsDaemon 1
User debian-tor

ControlSocket /var/run/tor/control GroupWritable RelaxDirModeCheck
ControlSocketsGroupWritable 1
SocksPort unix:/var/run/tor/socks WorldWritable
SocksPort 9050

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie

And then there is my configuration file:

/etc/tor/torrc

with content:

SOCKSPort 0

RunAsDaemon 0

ORPort 9001

DirPort 9030

Address myIPAddress

Nickname myNickname

ContactInfo myContactInfo


ExitPolicy reject *:*
ExitPolicy reject6 *:*

DisableDebuggerAttachment 0

Question:

  1. Can I just have set e.g.:

    SOCKSPort 0
    

    in my configuration file, because this server acts solely as a relay. Or do I have to remove the line:

    SocksPort 9050
    

    from the default file?

1

From the tor man page:

--defaults-torrc FILE Specify a file in which to find default values for Tor options. The contents of this file are overridden by those in the regular configuration file, and by those on the command line. (Default: /etc/tor/torrc-defaults.)

In Debian, tor is started with --defaults-torrc /usr/share/tor/tor-service-defaults-torrc. So, yes, SOCKSPort 0 is enough to disable Socks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.