Hallo,
hier mal der Stand der Dinge zur Information und vielleicht kann ja jemand helfen.
- Tor selber kompilieren klappt noch nicht, Probleme siehe unten.
- Tor von knox startet, verbindet sich aber nicht mit dem Tor-Netzwerk, Details ebenfalls unten.
Tor kompilieren
Beim Erstellen von ./configure für tor bin ich dann mit dem Befehl am weitesten gekommen:
Code:
CPPFLAGS='-I/usr/include' LDFLAGS='-L/home/clanger/computer/Fritz!Box/DaniSahne/ds-0.2.9/build/modified/filesystem/usr/lib -Wl,-rpath-link,../libc6/lib' ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux --with-libevent-dir=../libevent/usr --with-ssl-dir=../openssl
Allerdings hat mir das configure Skript an 3 Stellen gesagt, dass ein bestimmter Test nicht beim cross-compilen ausgeführt werden kann, und brach ab. Zum Beispiel:
Code:
> CPPFLAGS='-I/usr/include' LDFLAGS='-L/home/clanger/computer/Fritz!Box/DaniSahne/ds-0.2.9/build/modified/filesystem/usr/lib -Wl,-rpath-link,../libc6/lib' ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux --with-libevent-dir=../libevent/usr --with-ssl-dir=../openssl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking build system type... i386-pc-linux-gnu
checking host system type... mipsel-unknown-linux-gnu
checking for mipsel-linux-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... (cached) yes
checking for mipsel-linux-ranlib... no
checking for ranlib... ranlib
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for library containing dlopen... -ldl
checking for library containing pthread_create... -lpthread
checking for library containing pthread_detach... none required
checking for libevent directory... ../libevent/usr
checking whether we need extra options to link libevent... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
Das passiert an 3 Stellen, für libevent, für openssl und nochmal später (ich hab vergessen wo). Wenn man diese Tests aus der configure Datei rauslöscht, läuft wenigstens configure durch.
Code:
> CPPFLAGS='-I/usr/include' LDFLAGS='-L/home/clanger/computer/Fritz!Box/DaniSahne/ds-0.2.9/build/modified/filesystem/usr/lib -Wl,-rpath-link,../libc6/lib' ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux --with-libevent-dir=../libevent/usr --with-ssl-dir=../openssl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking build system type... i386-pc-linux-gnu
checking host system type... mipsel-unknown-linux-gnu
checking for mipsel-linux-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... (cached) yes
checking for mipsel-linux-ranlib... no
checking for ranlib... ranlib
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for library containing dlopen... -ldl
checking for library containing pthread_create... -lpthread
checking for library containing pthread_detach... none required
checking for libevent directory... ../libevent/usr
checking for OpenSSL directory... ../openssl
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking for string.h... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/types.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking event.h usability... yes
checking event.h presence... yes
checking for event.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking sys/limits.h usability... no
checking sys/limits.h presence... no
checking for sys/limits.h... no
checking for netinet/in.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking machine/limits.h usability... no
checking machine/limits.h presence... no
checking for machine/limits.h... no
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/time.h... (cached) yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for inttypes.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking sys/utime.h usability... no
checking sys/utime.h presence... no
checking for sys/utime.h... no
checking for gettimeofday... yes
checking for ftime... yes
checking for socketpair... yes
checking for uname... yes
checking for inet_aton... yes
checking for strptime... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for strlcat... no
checking for strlcpy... no
checking for strtoull... yes
checking for getpwnam... yes
checking for getpwuid... yes
checking for ftello... yes
checking for getaddrinfo... yes
checking for localtime_r... yes
checking for gmtime_r... yes
checking for event_get_version... yes
checking for event_get_method... yes
checking for event_set_log_callback... yes
checking for memmem... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... yes
checking for struct timeval.tv_sec... yes
checking for int8_t... yes
checking size of int8_t... 1
checking for int16_t... yes
checking size of int16_t... 2
checking for int32_t... yes
checking size of int32_t... 4
checking for int64_t... yes
checking size of int64_t... 8
checking for uint8_t... yes
checking size of uint8_t... 1
checking for uint16_t... yes
checking size of uint16_t... 2
checking for uint32_t... yes
checking size of uint32_t... 4
checking for uint64_t... yes
checking size of uint64_t... 8
checking for intptr_t... yes
checking size of intptr_t... 4
checking for uintptr_t... yes
checking size of uintptr_t... 4
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking for __int64... no
checking size of __int64... 0
checking for void *... yes
checking size of void *... 4
checking for time_t... yes
checking size of time_t... 4
checking for socklen_t... yes
checking size of socklen_t... 4
checking for cell_t... no
checking size of cell_t... 0
checking whether memset(0) sets pointers to NULL... cross
checking whether to use dmalloc (debug memory allocation library)... no
checking for gethostbyname_r... yes
checking how many arguments gethostbyname_r() wants... 6
checking whether the C compiler supports __func__... yes
checking whether the C compiler supports __FUNC__... no
checking whether the C compiler supports __FUNCTION__... yes
confdir: /usr/local/etc/tor
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tor.spec
config.status: creating contrib/tor.sh
config.status: creating contrib/torctl
config.status: creating contrib/torify
config.status: creating contrib/tor.logrotate
config.status: creating contrib/Makefile
config.status: creating contrib/osx/Makefile
config.status: creating contrib/osx/TorBundleDesc.plist
config.status: creating contrib/osx/TorBundleInfo.plist
config.status: creating contrib/osx/TorDesc.plist
config.status: creating contrib/osx/TorInfo.plist
config.status: creating contrib/osx/TorStartupDesc.plist
config.status: creating src/config/torrc.sample
config.status: creating doc/tor.1
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating doc/design-paper/Makefile
config.status: creating src/config/Makefile
config.status: creating src/common/Makefile
config.status: creating src/or/Makefile
config.status: creating src/win32/Makefile
config.status: creating src/tools/Makefile
config.status: creating contrib/suse/Makefile
config.status: creating contrib/suse/tor.sh
config.status: creating orconfig.h
config.status: executing default-1 commands
Ob dann natürlich alle Einstellungen von configure richtig sind, ist fraglich.
Ein darauffolgendes make jedenfalls gibt folgenden Fehler
Code:
> make
make all-recursive
make[1]: Entering directory `/home/clanger/computer/Install/tor/tor_fuer_fritzbox/tor-0.1.1.23'
Making all in src
make[2]: Entering directory `/home/clanger/computer/Install/tor/tor_fuer_fritzbox/tor-0.1.1.23/src'
Making all in common
make[3]: Entering directory `/home/clanger/computer/Install/tor/tor_fuer_fritzbox/tor-0.1.1.23/src/common'
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../openssl/include -I../libevent/usr/include -I/usr/include -g -O2 -Wall -g -O2 -c log.c
In Datei, eingefügt von ./util.h:17,
von log.c:24:
./compat.h:35:2: Fehler: #error "It seems your platform does not represent NULL as zero. We can't cope."
make[3]: *** [log.o] Fehler 1
make[3]: Leaving directory `/home/clanger/computer/Install/tor/tor_fuer_fritzbox/tor-0.1.1.23/src/common'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/clanger/computer/Install/tor/tor_fuer_fritzbox/tor-0.1.1.23/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/clanger/computer/Install/tor/tor_fuer_fritzbox/tor-0.1.1.23'
make: *** [all-recursive-am] Fehler 2
Da stehe ich nun und weiß nicht weiter. Vielleich hat ja ein cross-compile Experte noch einen Tipp?
Tor-Binary von knox laufen lassen
Erst mal vielen Dank an knox für das Binary. Mit erwähntem openssl und zlib von ds-0.2.9 und ließ sich das tor-binary auf der FB 7140 starten. Tor kommt aber nur soweit, die Keys zu laden
Code:
Sep 02 12:48:42.225 [notice] Tor 0.1.1.22 opening new log file.
Sep 02 12:48:42.225 [debug] parse_dir_server_line(): Trusted dirserver at 18.244.0.188:9031 (46DB)
Sep 02 12:48:42.235 [debug] parse_dir_server_line(): Trusted dirserver at 18.244.0.114:80 (E45D)
Sep 02 12:48:42.235 [debug] parse_dir_server_line(): Trusted dirserver at 86.59.21.38:80 (1F85)
Sep 02 12:48:42.245 [debug] parse_dir_server_line(): Trusted dirserver at 140.247.60.64:80 (F5FC)
Sep 02 12:48:42.245 [debug] parse_dir_server_line(): Trusted dirserver at 194.109.206.212:80 (EAD6)
Sep 02 12:48:42.255 [info] or_state_load(): Loaded state from "/var/tmp/.tor/state"
Sep 02 12:48:42.265 [warn] tor_init(): You are running Tor as root. You don't need to, and you probably shouldn't.
Sep 02 12:48:42.265 [info] crypto_seed_rng(): Seeding RNG from "/dev/urandom"
Sep 02 12:48:42.275 [debug] spawn_dnsworker(): just spawned a dns worker.
Sep 02 12:48:42.275 [debug] connection_add(): new conn type DNS worker, socket 10, nfds 3.
Sep 02 12:48:42.285 [debug] spawn_dnsworker(): just spawned a dns worker.
Sep 02 12:48:42.295 [debug] connection_add(): new conn type DNS worker, socket 14, nfds 4.
Sep 02 12:48:42.295 [debug] spawn_dnsworker(): just spawned a dns worker.
Sep 02 12:48:42.305 [debug] connection_add(): new conn type DNS worker, socket 16, nfds 5.
Sep 02 12:48:42.315 [info] init_keys(): Reading/making identity key "/var/tmp/.tor/keys/secret_id_key"...
Sep 02 12:48:42.775 [info] init_keys(): Reading/making onion key "/var/tmp/.tor/keys/secret_onion_key"...
#
Dann sitzt tor da, hört auf den konfigurierten Port (9002 bei mir)
Code:
# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
...
tcp 0 0 *:9002 *:* LISTEN
...
und rechnet sich einen Wolf. "ps" gibt ständig ein "R" beim ersten der 5 tor Prozesse aus (1 tor und 4*dns-thread?), und "uptime" ständig eine load von >1. Erst wenn ich tor beende, geht die uptime wieder auf ~0 herunter. Ich habe mit dem Paketmitschnitt die DSL Leitung überwacht. Kein einziges Paket geht von tor raus.
Für mich sieht das nach einer busy-loop aus.
Eigentlich sollte tor als nächstes sich mit den Directory Servern verbinden, als tor-client die Verbindung testen und dann als tor-server die eigene Erreichbarkeit testen. Auf meinem normalen Computer tut tor das auch alles, ich habe also gute Vergleichswerte.
Ach ja, Port in /var/flash/ar7.cfg ist freigegeben (meine FritzBox ist intern 10.0.0.1) und ist erreichbar (getestet mit telnet und Paketmitschnitt):
Code:
forwardrules = "tcp 0.0.0.0:0 0.0.0.0:0 1 out",
"tcp 0.0.0.0:9002 10.0.0.1:9002 0 #Tor",
...
Tja, da stehe ich nun. Die nächsten 2 Wochen habe ich wohl keine Zeit, tiefer in die Materie einzusteigen, aber vielleicht hat bis dahin ja schon jemand weitergemacht. Würde mich freuen.
Viele Grüße
Carsten