0

I have a server on the LAN that hosts a few minor Tor hidden services. I'd like it to also allow connections from the LAN to allow other computers on the LAN to use the SOCKSPORT rather than each one have to individually run their own tor proxy. In torrc if I set the following the tor daemon fails to bootstrap when I restart the machine. /var/log/tor/notices.log is empty upon boot and systemctl status tor shows tor as loaded, but the daemon doesn't allow connections.

SOCKSPORT localhost:9050
SOCKSPORT ip.of.my.server:9050

If I run sudo systemctl restart tor, tor restarts fine and begins to work, accepting connections on both localhost and the IP address without any issues. I can start/stop tor using systemd as much as I want and it works fine until reboot when the problem starts again.

If I comment out SOCKSPORT ip.of.my.server:9050 and reboot tor starts fine. Note that using SOCKSPORT ip.of.my.server:9100 results in the same problem, i.e. changing the port for the LAN doesn't change the error behavior. Also, this happens regardless of any SOCKSPolicys that may be set.

Currently running tor 0.3.5.10 on Debian 10.

0

Turns out it was an issue with my torrc. The comments in torrc makes it clear you can specify multiple bind addresses (i.e. localhost, 192.168.0.10 etc.). It doesn't make it clear that each bind address needs a different port. In perusing /var/log/syslog it turns out tor was failing to start because I had specified 127.0.0.1:9050 AND ip.of.my.server:9050. I should have just done only 0.0.0.0:9050, which binds to all interfaces.

Also a related note. torrc comments specifically mention using localhost:9050 but my tor fails when this is used and /var/log/syslog specifically says Nov 27 06:26:12 cryptoDaemon tor[1843]: Nov 27 06:26:12.331 [warn] Malformed IP "localhost" in address pattern; rejecting. The default comments in torrc should not use 'localhost' as an example if that exact verbiage is invalid.

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.