{"id":5235,"date":"2017-06-28T15:21:50","date_gmt":"2017-06-28T12:21:50","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=5235"},"modified":"2017-08-12T12:53:33","modified_gmt":"2017-08-12T09:53:33","slug":"tor-exit-node","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5235","title":{"rendered":"tor exit node"},"content":{"rendered":"<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <strong>tor<\/strong>:<\/p>\n<p><code># aptitude install tor<\/code><\/p>\n<p>\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u00a0<strong>torrc<\/strong> \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<p><!--more--><\/p>\n<p><code>Nickname ZZ35QQ<br \/>\nContactInfo Person somebody@example.com<br \/>\nControlPort 9051<br \/>\nDirPort 9030<br \/>\nExitPolicy accept *:80<br \/>\nExitPolicy accept *:443<br \/>\nExitPolicy reject *:*<br \/>\nORPort 9001<br \/>\nDataDirectory \/var\/lib\/tor<br \/>\nPidFile \/var\/run\/tor\/tor.pid<br \/>\nRunAsDaemon 1<br \/>\nUser debian-tor<br \/>\nControlSocket \/var\/run\/tor\/control GroupWritable RelaxDirModeCheck<br \/>\nControlSocketsGroupWritable 1<br \/>\nSocksPort unix:\/var\/run\/tor\/socks WorldWritable<br \/>\nSocksPort 9050<br \/>\nCookieAuthentication 1<br \/>\nCookieAuthFileGroupReadable 1<br \/>\nCookieAuthFile \/var\/run\/tor\/control.authcookie<br \/>\nLog notice file \/var\/log\/tor\/log<\/code><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 <strong>tor<\/strong>, \u043d\u0443\u0436\u0435\u043d <strong>http -&gt; socks<\/strong> <strong>proxy<\/strong> (\u0442\u0430\u043a \u043a\u0430\u043a <strong>tor<\/strong> &#8211; \u044d\u0442\u043e <strong>socks<\/strong> proxy \u0438 \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440), \u044f \u0432\u044b\u0431\u0440\u0430\u043b <strong>privoxy<\/strong>. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <strong>privoxy<\/strong>:<\/p>\n<p><code># aptitude install privoxy<\/code><\/p>\n<p>\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 <strong>config<\/strong> \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<p><code>confdir \/etc\/privoxy<br \/>\nlogdir \/var\/log\/privoxy<br \/>\nactionsfile match-all.action # Actions that are applied to all sites and maybe overruled later on.<br \/>\nactionsfile default.action # Main actions file<br \/>\nactionsfile user.action # User customizations<br \/>\nfilterfile default.filter<br \/>\nfilterfile user.filter # User customizations<br \/>\nlogfile logfile<br \/>\ndebug 1 # Log the destination for each request Privoxy let through.<br \/>\nlisten-address 127.0.0.1:8118<br \/>\ntoggle 1<br \/>\nenable-remote-toggle 0<br \/>\nenable-remote-http-toggle 0<br \/>\nenable-edit-actions 0<br \/>\nenforce-blocks 0<br \/>\npermit-access 0.0.0.0\/0<br \/>\nbuffer-limit 4096<br \/>\nforward-socks5 \/ 127.0.0.1:9050 .<br \/>\nforwarded-connect-retries 0<br \/>\naccept-intercepted-requests 1<br \/>\nallow-cgi-request-crunching 0<br \/>\nsplit-large-forms 0<br \/>\nkeep-alive-timeout 5<br \/>\nsocket-timeout 300<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443<\/p>\n<p><code>Invalid header received from client<\/code><\/p>\n<p>\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0432 \u043c\u043e\u0451\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043e\u043d \u0443\u0436\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d)<\/p>\n<p><code>accept-intercepted-requests 1<\/code><\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u043e\u0442\u0430 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 <strong>tor<\/strong>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 2 \u043f\u0440\u0430\u0432\u0438\u043b\u0430: \u043f\u0435\u0440\u0432\u043e\u0435 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>VPN<\/strong>), \u0432\u0442\u043e\u0440\u043e\u0435 &#8211; \u0434\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/p>\n<p><code># iptables -t nat -A PREROUTING -p tcp -m multiport --dport 80,443 -j REDIRECT --to 8118<br \/>\n# iptables -t nat -A OUTPUT -p tcp -m multiport --dport 80,443 -j REDIRECT --to 8118<\/code><\/p>\n<p><span style=\"color: #ff6600;\"><em><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong><\/em><\/span><\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0439 \u043d\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u043b\u044f <strong>openvpn<\/strong> \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c <strong>redsocks<\/strong> (\u0435\u0441\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <strong>Debian<\/strong>) <strong>proxy<\/strong>. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <strong>\/etc\/redsocks.conf<\/strong> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre>base {\r\n        log_info = on;\r\n        log = \"file:\/var\/log\/redsocks.log\";\r\n        daemon = on;\r\n        user = redsocks;\r\n        group = redsocks;\r\n        redirector = iptables;\r\n}\r\nredsocks {\r\n        local_ip = 10.22.22.1;\r\n        local_port = 7788;\r\n        ip = XX.XX.XX.XX;\r\n        port = YYYYY;\r\n        type = socks5;\r\n        login = \"foobar\";\r\n        password = \"baz\";\r\n}\r\nredudp {\r\n        local_ip = 10.22.22.1;\r\n        local_port = 7799;\r\n        ip = XX.XX.XX.XX;\r\n        port = YYYYY;\r\n        udp_timeout = 30;\r\n        udp_timeout_stream = 180;\r\n}\r\n<\/pre>\n<p>\u0433\u0434\u0435 <strong>XX.XX.XX.XX<\/strong> &#8211; IP socks5 \u043f\u0440\u043e\u043a\u0441\u0438, <strong>YYYYY<\/strong> &#8211; \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0440\u0442.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c tor: # aptitude install tor \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u00a0torrc \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,13],"tags":[],"class_list":["post-5235","post","type-post","status-publish","format-standard","hentry","category-others","category-security"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5235"}],"version-history":[{"count":4,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5235\/revisions"}],"predecessor-version":[{"id":5277,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5235\/revisions\/5277"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}