Hallo,
ich bin gerade dabei zu Testzwecken einen Hidden-Service aufzusetzen. Leider macht mir TOR nen Stricht durch die Rechnung. Ich musste als erstes in der torrc die notice-Logs aktivieren. Dann noch ne /var/log/tor/notice.log anlegen und debina-tor als Besitezr und Gruppe festlegen. dann noch chmod u+wrx. Jetzt schreibt TOR immerhin Logs. Ohne Konfig von Hidden-Services startet er normal und schriebt das in die Logs.
Log ohne Hidden-Service, hier ist alles normal:
Apr 21 00:32:32.000 [notice] Tor 0.3.2.10 (git-0edaa32732ec8930) opening log file. Apr 21 00:32:32.936 [notice] Tor 0.3.2.10 (git-0edaa32732ec8930) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2g, Zlib 1.2.11, Liblzma 5.2.2, and Libzstd 1.3.1. Apr 21 00:32:32.936 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Apr 21 00:32:32.936 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc". Apr 21 00:32:32.936 [notice] Read configuration file "/etc/tor/torrc". Apr 21 00:32:32.943 [notice] Scheduler type KIST has been enabled. Apr 21 00:32:32.943 [notice] Opening Socks listener on 127.0.0.1:9050 Apr 21 00:32:32.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip. Apr 21 00:32:33.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6. Apr 21 00:32:34.000 [notice] Bootstrapped 0%: Starting Apr 21 00:32:37.000 [notice] Starting with guard context "default" Apr 21 00:32:37.000 [notice] Bootstrapped 80%: Connecting to the Tor network Apr 21 00:32:37.000 [notice] Signaled readiness to systemd Apr 21 00:32:37.000 [notice] Opening Socks listener on /var/run/tor/socks Apr 21 00:32:37.000 [notice] Opening Control listener on /var/run/tor/control Apr 21 00:32:38.000 [notice] Bootstrapped 85%: Finishing handshake with first hop Apr 21 00:32:38.000 [notice] Bootstrapped 90%: Establishing a Tor circuit Apr 21 00:32:38.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working. Apr 21 00:32:38.000 [notice] Bootstrapped 100%: Done
Wenn ich dann nun die Zeilen der torrc hinzufüge, erscheinen gar keine neuen Logs mehr. Der Status des Dienstes sei aber aktiv. Wenn man den Teil dann wieder aus der torrc entfernt und den Dienst neu startet, sind wieder Logs vorhanden und der Dienst startet normal. Der Webserver apache2 ist sowohl unter 192.168.0.9:80 als auch unter 127.0.0.1:80 erreichbar (mit Lynx getestet).
Lese- und Schreibrechte sind im Verzeichnis vorhanden:
drwxr-xr-x 2 debian-tor debian-tor 4096 Apr 20 23:50 . drwxr-xr-x 3 debian-tor debian-tor 4096 Apr 20 23:50 .. root@HPCompaqDC530Server:/home/tor/hidden_service#
torrc (alles auskommentierte habe ich weggelassen)
Log notice file /var/log/tor/notices.log RunAsDaemon 1 Zum Aktivieren der Hidden-Services habe ich folgendes auskommentiert und geändert: HiddenServiceDir /home/tor/hidden_service HiddenServicePort 80 192.168.0.9:80
/usr/share/tor/tor-service-defaults-torrc
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 Log notice syslog