19.05.2013 19:58, Gusev A.M. пишет: > В Вск, 19/05/2013 в 18:05 +0400, "Артём Н." пишет: >> Когда система просыпается из hibernate, Tor начинает заново строить цепочки, >> при >> обращении чего-то в Интернет. >> При включенном файрволле, цепочки не строятся (в Vidalia отображаются >> попытки их >> построить). >> Когда я выключаю файрволл, цепочки строятся. >> Потом включаю файрволл, и всё работает. >> >> Что нужно открыть, чтобы Tor нормально строил цепочки? >> >> > Исходящие соединения от пользователя, запустившего процесс тор - > разрешаем. Tor запущен, как системная
> Входящие соединения, относящиеся к уже установленным - > разрешаем. А нужно ли разрешать входящие соединения вообще (кроме, того, что мне нужно)? Система за NAT (модем так настроен). > Входящие соединения на Control Port - разрешаем для нужных > адресов. Control Port не использую - Vidalia работает через unix сокет. > Разрешаем входящие соединения на SOCKS порт(для нужных > адресов), на порт узла и порт зеркала узлов(если предоставляете доступ к > ним). Прямое соединение на порт Tor тоже не использую. Файрволл перенаправляет на его порт весь трафик (кроме трафика Tor, разумеется). Может, проблема в этом? Кстати, как-то он нестабильно не работает: сегодня из hibernate вышел, всё подключилось и файрволл не трогал. Вот правила: iptables -t nat -N TUNNEL # # Ignoring... # # Ignore LANs and some other reserved addresses. # See Wikipedia and RFC5735 for full list of reserved networks. iptables -t nat -A TUNNEL -d 0.0.0.0/8 -j RETURN iptables -t nat -A TUNNEL -d 10.0.0.0/8 -j RETURN iptables -t nat -A TUNNEL -d 127.0.0.0/8 -j RETURN iptables -t nat -A TUNNEL -d 169.254.0.0/16 -j RETURN iptables -t nat -A TUNNEL -d 172.16.0.0/12 -j RETURN iptables -t nat -A TUNNEL -d 192.168.0.0/16 -j RETURN iptables -t nat -A TUNNEL -d 224.0.0.0/4 -j RETURN iptables -t nat -A TUNNEL -d 240.0.0.0/4 -j RETURN # # Skip services. # # FTP. No. Dangerous in web. #iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 20 -m state --state ESTABLISHED -j RETURN #iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 21 -m state --state NEW,ESTABLISHED -j RETURN #iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 1024:65534 -m state --state ESTABLISHED,RELATED -j RETURN #iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp -d 149.20.20.133 -j RETURN # SSH. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 22 -j RETURN # SMTP. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 25 -j RETURN # QMTP. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 209 -j RETURN # POP2. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 109 -j RETURN iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 109 -j RETURN # POP3. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 110 -j RETURN iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 110 -j RETURN # IMAP2. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 143 -j RETURN iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 143 -j RETURN # IMAP3. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 220 -j RETURN iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 220 -j RETURN # POP3S. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 995 -j RETURN iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 995 -j RETURN # SSMTP. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 465 -j RETURN # IMAPS. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 993 -j RETURN iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 993 -j RETURN # NNTP. #iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 119 -j RETURN # # Skip sites. # # Debian special. # packages.debian.org iptables -t nat -A TUNNEL -d 5.153.231.3 -j RETURN # # Debian repositories. # # archive.canonical.com iptables -t nat -A TUNNEL -d 91.189.92.191 -j RETURN # backports.debian.org iptables -t nat -A TUNNEL -d 130.89.148.14 -j RETURN # И т.д. # Yandex. iptables -t nat -A TUNNEL -d 87.250.250.11 -j RETURN iptables -t nat -A TUNNEL -d 93.158.134.0/24 -j RETURN iptables -t nat -A TUNNEL -d 213.180.193.11 -j RETURN iptables -t nat -A TUNNEL -d 213.180.204.11 -j RETURN iptables -t nat -A TUNNEL -d 77.88.21.11 -j RETURN # yarportal.ru iptables -t nat -A TUNNEL -d 5.9.52.188 -j RETURN # # DNS. # iptables -t nat -A TUNNEL -o eth0 -p udp -m udp --dport 53 -j REDIRECT --to-ports 9053 iptables -t filter -A OUTPUT -o eth0 -p udp -m udp --dport 53 -j ACCEPT # # TOR ports. # iptables -t nat -A TUNNEL ! -o lo -p tcp -m tcp --dport 9001 -j RETURN iptables -t nat -A TUNNEL ! -o lo -p tcp -m tcp --sport 9001 -j RETURN iptables -t filter -A OUTPUT ! -o lo -p tcp -m tcp --dport 9001 -j ACCEPT # # Traffic. # # HTTP to Privoxy. #iptables -t nat -A TUNNEL -o eth0 -p tcp --dport 80 -m owner ! --uid-owner privoxy -m tcp -j REDIRECT --to-ports 8118 #iptables -t nat -A TUNNEL -o eth0 -p tcp --dport 443 -m owner ! --uid-owner privoxy -m tcp -j REDIRECT --to-ports 8118 #iptables -t nat -A TUNNEL -o eth0 -p tcp --dport 8080 -m owner ! --uid-owner privoxy -m tcp -j REDIRECT --to-ports 8118 # Anything else should be redirected to port 8888 (redsocks). #iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp -m owner ! --uid-owner redsocks -j REDIRECT --to-ports 8888 # TOR doesn't support UDP. #iptables -t nat -A TUNNEL -o eth0 -p tcp -m udp -m owner ! --uid-owner redsocks -j REDIRECT --to-ports 8888 # Special for FTP. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 20 -m state --state ESTABLISHED -j REDIRECT --to-port 9040 iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 21 -m state --state NEW,ESTABLISHED -j REDIRECT --to-port 9040 iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp --dport 1024:65534 -m state --state ESTABLISHED,RELATED -j REDIRECT --to-port 9040 # Redirecting to TOR. iptables -t nat -A TUNNEL -o eth0 -p tcp -m tcp -j REDIRECT --to-ports 9040 iptables -t filter -A OUTPUT -o eth0 -p tcp -m tcp --dport 9040 -j ACCEPT #iptables -t filter -A OUTPUT -o eth0 -j DROP # Any tcp connection should be redirected. iptables -t nat -A OUTPUT -p tcp -j TUNNEL > Остальное - запрещаем. Вроде всё просто. Ipsec не используете? > Vidalia в связи с использованием Tor Browser ? Vidalia без Tor Browser, но с TorButton. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

