Hallo, ich habe zweimal nach der Anleitung im Wiki https://wiki.ubuntuusers.de/VM_basierende_Anonymisierung/ eine VM mit TOR eingerichtet(Variante 2). Das funktionierte jeweils einige Tage und dann lässt sich keine Verbindung ins Internet mehr herstellen. Zunächst hatte es noch geholfen TOR mit dem Skript aus der Anleitung neuzustarten:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | #!/bin/bash # Kernelmodule laden modprobe ip_tables modprobe ip_nat_ftp modprobe ip_nat_irc modprobe ip_conntrack_irc modprobe ip_conntrack_ftp modprobe iptable_filter modprobe iptable_nat modprobe ipt_REJECT modprobe xt_recent modprobe ipt_mac # alle bisherigen Regeln und Ketten löschen iptables --flush iptables --table nat --flush iptables --delete-chain # jeglichen Traffic verwerfen iptables --policy INPUT DROP iptables --policy OUTPUT DROP iptables --policy FORWARD DROP # zugelassene Verbindungen # Schnittstellenbezeichnung ab 16.04 anpassen ip link set eth0 up #manuelles Hochfahren der Schnittstelle dhclient eth0 #DHCP beantragen iptables --append INPUT --in-interface eth0 --match state --state ESTABLISHED,RELATED --jump ACCEPT iptables --append OUTPUT --out-interface eth0 --match state --state ESTABLISHED,RELATED --jump ACCEPT # localhost zulassen iptables --append INPUT --in-interface lo --jump ACCEPT iptables --append OUTPUT --out-interface lo --jump ACCEPT # Ruleset for Tor Transparent Proxy iptables -t nat --append OUTPUT --out-interface lo --jump RETURN iptables -t nat --append OUTPUT --match owner --uid-owner "debian-tor" --jump RETURN iptables -t nat --append OUTPUT --protocol udp --dport 53 --jump REDIRECT --to-ports 9053 iptables -t nat --append OUTPUT --protocol tcp --syn --jump REDIRECT --to-ports 9040 iptables --append OUTPUT --match state --state ESTABLISHED,RELATED --jump ACCEPT iptables --append OUTPUT --match owner --uid-owner "debian-tor" --jump ACCEPT for NET in 127.0.0.0/8; do iptables --append OUTPUT --destination $NET --jump ACCEPT done ## optional Zugriff aus dem lokalen Netzbereich 192.168.1.0 ermöglichen, z.B. für ssh #for NET in 192.168.1.0/24; do # iptables --append INPUT --destination $NET --jump ACCEPT # iptables --append OUTPUT --destination $NET --jump ACCEPT #done ## alternativ kann der Port auch ohne Einschränkung freigeschaltet werden # iptables --append INPUT --protocol tcp --dport 22 --jump ACCEPT # iptables --append OUTPUT --protocol tcp --sport 22 --jump ACCEPT # zur Zeitsynchronisation wird der Port 123 freigeschaltet iptables --append OUTPUT --protocol udp --match udp --dport 123 --jump ACCEPT # der Rest wird verworfen iptables --append OUTPUT --jump REJECT ## bis 12.04 auskommentieren # /etc/init.d/networking restart # /etc/init.d/tor restart ## ab 14.04 auskommentieren # service networking restart # service tor restart |
aber schließlich funktioniert das auch nicht mehr. Beim zweiten mal hatte ich ein aktuelleres TOR aus dem PPA installiert https://wiki.ubuntuusers.de/Tor/Installation/#Fremdquelle. Das war aber offensichtlich auch nicht das Problem. Kann es sein, dass es ein Problem mit der nicht aktuellen Systenzeit im Zusammenspiel mit TOR gibt oder was ist das Problem?