{"id":292223,"date":"2019-07-18T03:01:06","date_gmt":"2019-07-18T03:01:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292223"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292223","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c 3proxy \u0438 iptables\/netfilter \u0438\u043b\u0438 \u043a\u0430\u043a \u00ab\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0451 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\u00bb"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u043b\u0438\u0431\u043e \u0447\u0430\u0441\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u044b. <\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0440\u0435\u0448\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0442\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0451 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u0443 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u2014 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b HTTPS. \u0412 \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c HTTP \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e, \u043d\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 HTTPS \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0447\u0430\u0441\u0442\u044c\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0412 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445 \u043a \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 Squid \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u0430\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c, \u0447\u0442\u043e <s>\u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0440\u0435\u0434<\/s> \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a MITM \u2014 \u0430\u0442\u0430\u043a\u0430. \u042f \u0437\u043d\u0430\u044e, \u0447\u0442\u043e Squid \u0443\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u043e \u0440\u0435\u0447\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u043c \u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c 3proxy \u043e\u0442 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e 3APA3A.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 3proxy \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u043f\u043e\u043b\u043d\u043e\u0435 \u0438 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c NAT, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041e\u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Debian 9 x64. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c!<br \/>  <a name=\"habracut\"><\/a>   <\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 3proxy \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h3>\n<p>  1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c ifconfig (\u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 net-tools)<br \/>  <code>apt-get install net-tools<\/code><br \/>  2. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Midnigth Commander<br \/>  <code>apt-get install mc<\/code><br \/>  3. \u0423 \u043d\u0430\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 2 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430: <br \/>  enp0s3 \u2014 \u0432\u043d\u0435\u0448\u043d\u0438\u0439, \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442<br \/>  enp0s8 \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439, \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c<br \/>   \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 Debian-based \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f eth0 \u0438 eth1.<br \/>  <code>ifconfig -a<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Interfaces<\/b><\/p>\n<div class=\"spoiler_text\">enp0s3: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500<br \/>   inet 192.168.23.11 netmask 255.255.255.0 broadcast 192.168.23.255<br \/>   inet6 fe80::a00:27ff:fec2:bae4 prefixlen 64 scopeid 0x20 ether 08:00:27:c2:ba:e4 txqueuelen 1000 (Ethernet)<br \/>   RX packets 6412 bytes 8676619 (8.2 MiB)<br \/>   RX errors 0 dropped 0 overruns 0 frame 0<br \/>   TX packets 1726 bytes 289128 (282.3 KiB)<br \/>   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/p>\n<p>  enp0s8: flags=4098&lt;BROADCAST,MULTICAST&gt; mtu 1500<br \/>   ether 08:00:27:79:a7:e3 txqueuelen 1000 (Ethernet)<br \/>   RX packets 0 bytes 0 (0.0 B)<br \/>   RX errors 0 dropped 0 overruns 0 frame 0<br \/>   TX packets 0 bytes 0 (0.0 B)<br \/>   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/p>\n<p>  lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt; mtu 65536<br \/>   inet 127.0.0.1 netmask 255.0.0.0<br \/>   inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback)<br \/>   RX packets 0 bytes 0 (0.0 B)<br \/>   RX errors 0 dropped 0 overruns 0 frame 0<br \/>   TX packets 0 bytes 0 (0.0 B)<br \/>   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 enp0s8 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043c\u044b \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u043c, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Proxy NAT \u0438\u043b\u0438 NAT. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0435\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 ip. <\/p>\n<p>  4. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 3proxy<\/p>\n<p>   4.1 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 3proxy \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 <\/p>\n<p>  <code>root@debian9:~# apt-get install build-essential libevent-dev libssl-dev -y<\/code><\/p>\n<p>   4.2. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438<\/p>\n<p>  <code>root@debian9:~# mkdir -p \/opt\/proxy<\/code><\/p>\n<p>   4.3. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u044d\u0442\u0443 \u043f\u0430\u043f\u043a\u0443<\/p>\n<p>  <code>root@debian9:~# cd \/opt\/proxy<br \/>  <\/code><\/p>\n<p>  4.4. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0430\u043a\u0435\u0442 3proxy. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0431\u044b\u043b\u0430 0.8.12 (18\/04\/2018) \u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0435\u0451 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 3proxy<\/p>\n<p>  <code>root@debian9:\/opt\/proxy# wget https:\/\/github.com\/z3APA3A\/3proxy\/archive\/0.8.12.tar.gz<br \/>  <\/code><\/p>\n<p>   4.5. \u0420\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0432<\/p>\n<p>  <code>root@debian9:\/opt\/proxy# tar zxvf 0.8.12.tar.gz<\/code><\/p>\n<p>  4.6. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<p>  <code>root@debian9:\/opt\/proxy# cd 3proxy-0.8.12<\/code><\/p>\n<p>  4.7. \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u044b\u043b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u043c (\u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u0441\u0451 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e, ip \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f)<\/p>\n<p>  <code>root@debian9:\/opt\/proxy\/3proxy-0.8.12# nano +29 src\/proxy.h<\/code><\/p>\n<p>   \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <\/p>\n<p>  <code>#define ANONYMOUS 1<br \/>  <\/code><br \/>   \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Ctrl+x \u0438 Enter, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  4.8. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<p>  <code>root@debian9:\/opt\/proxy\/3proxy-0.8.12# make -f Makefile.Linux<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Makelog<\/b><\/p>\n<div class=\"spoiler_text\">make[2]: Leaving directory &#8216;\/opt\/proxy\/3proxy-0.8.12\/src\/plugins\/TransparentPlugin&#8217;<br \/>  make[1]: Leaving directory &#8216;\/opt\/proxy\/3proxy-0.8.12\/src&#8217;  <\/div>\n<\/div>\n<p>   \u041e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u0442, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c.<\/p>\n<p>  4.9. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/p>\n<p>  <code>root@debian9:\/opt\/proxy\/3proxy-0.8.12# make -f Makefile.Linux install<\/code><\/p>\n<p>  4.10. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043a\u0443\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/p>\n<p>  <code>root@debian9:\/opt\/proxy\/3proxy-0.8.12# cd ~\/<br \/>  root@debian9:~# whereis 3proxy<\/code><br \/>  3proxy: \/usr\/local\/bin\/3proxy \/usr\/local\/etc\/3proxy<\/p>\n<p>  4.11. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043b\u043e\u0433\u043e\u0432 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<p>  <code>root@debian9:~# mkdir -p \/home\/joke\/proxy\/logs<\/code><\/p>\n<p>   4.12. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433<\/p>\n<p>  <code>root@debian9:~# cd \/home\/joke\/proxy\/<\/code><\/p>\n<p>  4.13. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0442\u0443\u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433<\/p>\n<p>  <code>root@debian9:\/home\/joke\/proxy# cat &gt; 3proxy.conf<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">3proxy.conf<\/b><\/p>\n<div class=\"spoiler_text\">daemon<br \/>  pidfile \/home\/joke\/proxy\/3proxy.pid<br \/>  nserver 8.8.8.8<br \/>  nscache 65536<br \/>  users tester:CL:1234<br \/>  timeouts 1 5 30 60 180 1800 16 60<br \/>  log \/home\/joke\/proxy\/logs\/3proxy.log D<br \/>  logformat &quot;- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T&quot;<br \/>  rotate 3<br \/>  auth strong<br \/>  flush<br \/>  allow tester<br \/>  socks -p3128<br \/>  proxy -p8080  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Ctrl + Z<\/p>\n<p>  4.14. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c pid \u2014 \u0444\u0430\u0439\u043b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435.<\/p>\n<p>  <code>root@debian9:\/home\/joke\/proxy# cat &gt; 3proxy.pid<\/code><\/p>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Ctrl + Z<\/p>\n<p>  4.15. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440!<\/p>\n<p>  <code>root@debian9:\/home\/joke\/proxy# 3proxy \/home\/joke\/proxy\/3proxy.conf<\/code><\/p>\n<p>  4.16. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0440\u0442\u044b<\/p>\n<p>  <code>root@debian9:~\/home\/joke\/proxy# netstat -nlp<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">netstat log<\/b><\/p>\n<div class=\"spoiler_text\">Active Internet connections (only servers)<br \/>  Proto Recv-Q Send-Q Local Address Foreign Address State PID\/Program name <br \/>  tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 504\/3proxy <br \/>  tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 338\/sshd <br \/>  tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 504\/3proxy <br \/>  tcp6 0 0 :::22 :::* LISTEN 338\/sshd <br \/>  udp 0 0 0.0.0.0:68 0.0.0.0:* 352\/dhclient   <\/div>\n<\/div>\n<p>   \u041a\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435, \u0432\u0435\u0431-\u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0443 \u043d\u0430\u0441 \u043f\u043e\u0440\u0442 8080, Socks5-\u043f\u0440\u043e\u043a\u0441\u0438 \u2014 3128.<\/p>\n<p>  4.17. \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0451 \u0432 cron.<\/p>\n<p>  <code>root@debian9:\/home\/joke\/proxy# crontab -e<\/code><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n<p>  <code>@reboot \/usr\/local\/bin\/3proxy \/home\/joke\/proxy\/3proxy.conf<\/code><\/p>\n<p>  \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Enter, \u0442\u0430\u043a \u043a\u0430\u043a cron \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b.<\/p>\n<p>  \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u043e\u0432\u043e\u0433\u043e crontab-\u0430.<\/p>\n<p>  crontab: installing new crontab<\/p>\n<p>  4.18. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043a \u043f\u0440\u043e\u043a\u0441\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 Firefox (\u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u043e\u043a\u0441\u0438) \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 FoxyProxy \u0434\u043b\u044f socks5 \u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  <code>root@debian9:\/home\/joke\/proxy# reboot<\/code><\/p>\n<p>  4.19. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u043a\u0441\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043b\u043e\u0433\u0438. \u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">3 proxy log<\/b><\/p>\n<div class=\"spoiler_text\">1542573996.018 PROXY.8080 00000 tester 192.168.23.10:50915 217.12.15.54:443 1193 6939 0 CONNECT_ads.yahoo.com:443_HTTP\/1.1<br \/>  1542574289.634 SOCK5.3128 00000 tester 192.168.23.10:51193 54.192.13.69:443 0 0 0 CONNECT_normandy.cdn.mozilla.net:443  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Transparent Proxy NAT<\/h3>\n<p>   \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440. \u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435 tcp-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u043b\u0438\u0431\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (\u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0448\u0438\u0440\u0438\u043d\u0443 \u043a\u0430\u043d\u0430\u043b\u0430, \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u21162!) \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0421\u043b\u0443\u0436\u0431\u0430 DNS \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 3proxy (dnspr). UDP \u043d\u0430\u0440\u0443\u0436\u0443 \u00ab\u0445\u043e\u0434\u0438\u0442\u044c\u00bb \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c forward (\u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0432 \u044f\u0434\u0440\u0435 Linux).<\/p>\n<p>  1. \u041d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 enp0s8<\/p>\n<p>  <code>root@debian9:~# nano \/etc\/network\/interfaces<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\/etc\/network\/interfaces file<\/b><\/p>\n<div class=\"spoiler_text\"># This file describes the network interfaces available on your system<br \/>  # and how to activate them. For more information, see interfaces(5).<\/p>\n<p>  source \/etc\/network\/interfaces.d\/*<\/p>\n<p>  # The loopback network interface<br \/>  auto lo<br \/>  iface lo inet loopback<\/p>\n<p>  # The primary network interface<br \/>  allow-hotplug enp0s3<br \/>  iface enp0s3 inet dhcp<\/p>\n<p>  # The secondary network interface<br \/>  allow-hotplug enp0s8 <br \/>  iface enp0s8 inet static<br \/>  address 192.168.201.254<br \/>  netmask 255.255.255.0  <\/div>\n<\/div>\n<p>   \u0422\u0443\u0442 \u043c\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 enp0s8 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 192.168.201.254 \u0438 \u043c\u0430\u0441\u043a\u0443 255.255.255.0<br \/>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 Ctrl+X \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f<\/p>\n<p>  <code>root@debian9:~# reboot<\/code><\/p>\n<p>  2. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/p>\n<p>  <code>root@debian9:~# ifconfig<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ifconfig log<\/b><\/p>\n<div class=\"spoiler_text\">enp0s3: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500<br \/>   inet 192.168.23.11 netmask 255.255.255.0 broadcast 192.168.23.255<br \/>   inet6 fe80::a00:27ff:fec2:bae4 prefixlen 64 scopeid 0x20 ether 08:00:27:c2:ba:e4 txqueuelen 1000 (Ethernet)<br \/>   RX packets 61 bytes 7873 (7.6 KiB)<br \/>   RX errors 0 dropped 0 overruns 0 frame 0<br \/>   TX packets 65 bytes 10917 (10.6 KiB)<br \/>   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/p>\n<p>  enp0s8: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500<br \/>   inet 192.168.201.254 netmask 255.255.255.0 broadcast 192.168.201.255<br \/>   inet6 fe80::a00:27ff:fe79:a7e3 prefixlen 64 scopeid 0x20 ether 08:00:27:79:a7:e3 txqueuelen 1000 (Ethernet)<br \/>   RX packets 0 bytes 0 (0.0 B)<br \/>   RX errors 0 dropped 0 overruns 0 frame 0<br \/>   TX packets 8 bytes 648 (648.0 B)<br \/>   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/p>\n<p>  lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt; mtu 65536<br \/>   inet 127.0.0.1 netmask 255.0.0.0<br \/>   inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback)<br \/>   RX packets 0 bytes 0 (0.0 B)<br \/>   RX errors 0 dropped 0 overruns 0 frame 0<br \/>   TX packets 0 bytes 0 (0.0 B)<br \/>   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<\/p>\n<p>  3. \u0412\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c 3proxy \u0434\u043b\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <code>root@debian9:~# cd \/home\/joke\/proxy\/<br \/>  root@debian9:\/home\/joke\/proxy# cat &gt; 3proxytransp.conf<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u21161<\/b><\/p>\n<div class=\"spoiler_text\">daemon<br \/>  pidfile \/home\/joke\/proxy\/3proxy.pid<br \/>  nserver 8.8.8.8<br \/>  nscache 65536<br \/>  timeouts 1 5 30 60 180 1800 16 60<br \/>  log \/home\/joke\/proxy\/logs\/3proxy.log D<br \/>  logformat &quot;- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T&quot;<br \/>  rotate 3<br \/>  flush<br \/>  auth iponly<br \/>  dnspr<br \/>  allow * <br \/>  parent 1000 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418 3128 tester 1234<br \/>  plugin \/opt\/proxy\/3proxy-0.8.12\/src\/TransparentPlugin.ld.so transparent_plugin<br \/>  tcppm -i0.0.0.0 888 127.0.0.1 11111  <\/div>\n<\/div>\n<p>  4. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c 3proxy \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c<br \/>  <code>root@debian9:\/home\/joke\/proxy# \/usr\/local\/bin\/3proxy \/home\/joke\/proxy\/3proxytransp.conf<\/code><\/p>\n<p>  5. \u0421\u043d\u043e\u0432\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 crontab<br \/>  <code>root@debian9:\/home\/joke\/proxy# crontab -e<br \/>  @reboot \/usr\/local\/bin\/3proxy \/home\/joke\/proxy\/3proxytransp.conf<\/code><\/p>\n<p>  6. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u043d\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438<br \/>  <code>root@debian9:~# netstat -nlp<br \/>  <\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">netstat log<\/b><\/p>\n<div class=\"spoiler_text\">Active Internet connections (only servers)<br \/>  Proto Recv-Q Send-Q Local Address Foreign Address State PID\/Program name<br \/>  tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 349\/sshd<br \/>  tcp 0 0 0.0.0.0:888 0.0.0.0:* LISTEN 354\/3proxy<br \/>  tcp6 0 0 :::22 :::* LISTEN 349\/sshd<br \/>  udp 0 0 0.0.0.0:53 0.0.0.0:* 354\/3proxy<br \/>  udp 0 0 0.0.0.0:68 0.0.0.0:* 367\/dhclient  <\/div>\n<\/div>\n<p>  7. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 888, DNS \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 53, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 socks5 \u2014 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 DNS \u0413\u0443\u0433\u043b 8.8.8.8. \u041d\u0430\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 netfilter (iptables) \u0438 DHCP \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432.<\/p>\n<p>  8. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0430\u043a\u0435\u0442 iptables-persistent \u0438 dhcpd<\/p>\n<p>  <code>root@debian9:~# apt-get install iptables-persistent isc-dhcp-server<\/code><\/p>\n<p>  9. \u041f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 dhcpd<br \/>  <code>root@debian9:~# nano \/etc\/dhcp\/dhcpd.conf<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">dhcpd.conf<\/b><\/p>\n<div class=\"spoiler_text\"># dhcpd.conf<br \/>  #<br \/>  # Sample configuration file for ISC dhcpd<br \/>  #<\/p>\n<p>  # option definitions common to all supported networks\u2026<br \/>  option domain-name \u00abexample.org\u00bb;<br \/>  option domain-name-servers ns1.example.org, ns2.example.org;<\/p>\n<p>  default-lease-time 600;<br \/>  max-lease-time 7200;<\/p>\n<p>  ddns-update-style none;<\/p>\n<p>  # If this DHCP server is the official DHCP server for the local<br \/>  # network, the authoritative directive should be uncommented.<\/p>\n<p>  authoritative;<\/p>\n<p>  # A slightly different configuration for an internal subnet.<br \/>  subnet 192.168.201.0 netmask 255.255.255.0 {<br \/>  range 192.168.201.10 192.168.201.250;<br \/>  option domain-name-servers 192.168.201.254;<br \/>  option routers 192.168.201.254;<br \/>  option broadcast-address 192.168.201.255;<br \/>  default-lease-time 600;<br \/>  max-lease-time 7200;<br \/>  }  <\/div>\n<\/div>\n<p>  11. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 67<br \/>  <code>root@debian9:~# reboot<br \/>  root@debian9:~# netstat -nlp<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">netstat log<\/b><\/p>\n<div class=\"spoiler_text\">Active Internet connections (only servers)<br \/>  Proto Recv-Q Send-Q Local Address Foreign Address State PID\/Program name <br \/>  tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 389\/sshd <br \/>  tcp 0 0 0.0.0.0:888 0.0.0.0:* LISTEN 310\/3proxy <br \/>  tcp6 0 0 :::22 :::* LISTEN 389\/sshd <br \/>  udp 0 0 0.0.0.0:20364 0.0.0.0:* 393\/dhcpd <br \/>  udp 0 0 0.0.0.0:53 0.0.0.0:* 310\/3proxy <br \/>  udp 0 0 0.0.0.0:67 0.0.0.0:* 393\/dhcpd <br \/>  udp 0 0 0.0.0.0:68 0.0.0.0:* 405\/dhclient <br \/>  udp6 0 0 :::31728 :::* 393\/dhcpd <br \/>  raw 0 0 0.0.0.0:1 0.0.0.0:* 393\/dhcpd <\/p><\/div>\n<\/div>\n<p>  12. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 tcp \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442 888 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 iptables<\/p>\n<p>  <code>root@debian9:~# iptables -t nat -A PREROUTING -s 192.168.201.0\/24 -p tcp -j REDIRECT --to-ports 888<\/code><\/p>\n<p>  <code>root@debian9:~# iptables-save &gt; \/etc\/iptables\/rules.v4<\/code><\/p>\n<p>  13. \u0414\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0441\u044b \u043a\u0430\u043d\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041e\u0431\u0449\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c 1000. \u041d\u043e\u0432\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e 0.2, 0.2, 0.2, 0.2, 0,1, 0,1 \u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 web-\u043f\u0440\u043e\u043a\u0441\u0438 \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e socks5 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c connect, \u0435\u0441\u043b\u0438 socks4, \u0442\u043e socks4 (socks4 \u041d\u0415 \u041f\u041e\u0414\u0414\u0415\u0420\u0416\u0418\u0412\u0410\u0415\u0422 \u0410\u0412\u0422\u041e\u0420\u0418\u0417\u0410\u0426\u0418\u042e \u041b\u041e\u0413\u0418\u041d\/\u041f\u0410\u0420\u041e\u041b\u042c!)<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u21162<\/b><\/p>\n<div class=\"spoiler_text\">daemon<br \/>  pidfile \/home\/joke\/proxy\/3proxy.pid<br \/>  nserver 8.8.8.8<br \/>  nscache 65536<br \/>  maxconn 500<br \/>  timeouts 1 5 30 60 180 1800 16 60<br \/>  log \/home\/joke\/proxy\/logs\/3proxy.log D<br \/>  logformat &quot;- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T&quot;<br \/>  rotate 3<br \/>  flush<br \/>  auth iponly<br \/>  dnspr<br \/>  allow *<\/p>\n<p>  parent 200 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418\u21161 3128 tester 1234<br \/>  parent 200 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418\u21162 3128 tester 1234<br \/>  parent 200 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418\u21163 3128 tester 1234<br \/>  parent 200 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418\u21164 3128 tester 1234<br \/>  parent 100 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418\u21165 3128 tester 1234<br \/>  parent 100 socks5 IP_\u0410\u0414\u0420\u0415\u0421_\u0412\u041d\u0415\u0428\u041d\u0415\u0413\u041e_\u041f\u0420\u041e\u041a\u0421\u0418\u21166 3128 tester 1234<\/p>\n<p>  plugin \/opt\/proxy\/3proxy-0.8.12\/src\/TransparentPlugin.ld.so transparent_plugin<br \/>  tcppm -i0.0.0.0 888 127.0.0.1 11111  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 NAT + Transparent Proxy<\/h3>\n<p>   \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c NAT \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u043c \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0438\u043b\u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438\/\u043f\u043e\u0434\u0441\u0435\u0442\u044f\u043c\u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0434\u043e\u0433\u0430\u0434\u044b\u0432\u0430\u044f\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438. \u0412\u0441\u0435 https \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\/\u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u0434\u0441\u0435\u0442\u0438\/\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0442\u0430\u043c, \u0433\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u0430\u043a pandora.com. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434\u0441\u0435\u0442\u0438\/\u0430\u0434\u0440\u0435\u0441\u0430.<\/p>\n<p>  1. \u041f\u0438\u043d\u0433\u0443\u0435\u043c <\/p>\n<p>  <code>root@debian9:~# ping pandora.com<\/code><br \/>  PING pandora.com (208.85.40.20) 56(84) bytes of data.<\/p>\n<p>  2. \u041d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0432 \u0433\u0443\u0433\u043b\u0435 BGP 208.85.40.20 <\/p>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/bgp.he.net\/net\/208.85.40.0\/24#_netinfo\">bgp.he.net\/net\/208.85.40.0\/24#_netinfo<\/a><br \/>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0441\u043a\u043e\u043c\u0430\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u044d\u0442\u043e AS40428 Pandora Media, Inc<\/p>\n<p>  <a href=\"https:\/\/bgp.he.net\/net\/208.85.40.0\/24#_netinfo\">bgp.he.net\/net\/208.85.40.0\/24#_netinfo<\/a><\/p>\n<p>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b v4<\/p>\n<p>  <a href=\"https:\/\/bgp.he.net\/AS40428#_prefixes\">bgp.he.net\/AS40428#_prefixes<\/a><\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0438\u0441\u043a\u043e\u043c\u044b\u0435 \u043f\u043e\u0434\u0441\u0435\u0442\u0438!<\/p>\n<p>  199.116.161.0\/24<br \/>  199.116.162.0\/24<br \/>  199.116.164.0\/23<br \/>  199.116.164.0\/24<br \/>  199.116.165.0\/24<br \/>  208.85.40.0\/24<br \/>  208.85.41.0\/24<br \/>  208.85.42.0\/23<br \/>  208.85.42.0\/24<br \/>  208.85.43.0\/24<br \/>  208.85.44.0\/24<br \/>  208.85.46.0\/23<br \/>  208.85.46.0\/24<br \/>  208.85.47.0\/24<\/p>\n<p>  3. \u0414\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044e. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/ip-calculator.ru\/aggregate\/\">ip-calculator.ru\/aggregate<\/a> \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0442\u0443\u0434\u0430 \u043d\u0430\u0448 \u0441\u043f\u0438\u0441\u043e\u043a. \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 6 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u0432\u043c\u0435\u0441\u0442\u043e 14-\u0442\u0438.<\/p>\n<p>  199.116.161.0\/24<br \/>  199.116.162.0\/24<br \/>  199.116.164.0\/23<br \/>  208.85.40.0\/22<br \/>  208.85.44.0\/24<br \/>  208.85.46.0\/23<\/p>\n<p>  4. \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables<\/p>\n<p>  <code>root@debian9:~# iptables -F<br \/>  root@debian9:~# iptables -X<br \/>  root@debian9:~# iptables -t nat -F<br \/>  root@debian9:~# iptables -t nat -X<\/code><\/p>\n<p>  \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c forward \u0438 NAT<\/p>\n<p>  <code>root@debian9:~# echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<br \/>  root@debian9:~# iptables -A FORWARD -i enp0s3 -o enp0s8 -j ACCEPT<br \/>  root@debian9:~# iptables -A FORWARD -i enp0s8 -o enp0s3 -j ACCEPT<br \/>  root@debian9:~# iptables -t nat -A POSTROUTING -o enp0s3 -s 192.168.201.0\/24 -j MASQUERADE<\/code><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b forward \u0431\u044b\u043b \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0444\u0430\u0439\u043b<\/p>\n<p>  <code>root@debian9:~# nano \/etc\/sysctl.conf<\/code><\/p>\n<p>  \u0418 \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n<p>  net.ipv4.ip_forward = 1<\/p>\n<p>  Ctrl+X \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430<\/p>\n<p>  5. \u0417\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0434\u0441\u0435\u0442\u0438 pandora.com \u0432 \u043f\u0440\u043e\u043a\u0441\u0438<\/p>\n<p>  <code>root@debian9:~# iptables -t nat -A PREROUTING -s 192.168.201.0\/24 -d 199.116.161.0\/24,199.116.162.0\/24,199.116.164.0\/23,208.85.40.0\/22,208.85.44.0\/24,208.85.46.0\/23 -p tcp -j REDIRECT --to-ports 888 <\/code><\/p>\n<p>  6. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <\/p>\n<p>  <code>root@debian9:~# iptables-save &gt; \/etc\/iptables\/rules.v4<\/code><\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Transparent Proxy via router<\/h3>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u041f\u041a \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u0437\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u043c\/\u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u043c. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u0432\u0441\u044f \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. <\/p>\n<p>  \u0412\u0410\u0416\u041d\u041e! \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u0448\u043b\u044e\u0437 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP \u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u043b\u0438\u0431\u043e \u0431\u044b\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u043a\u0443 \u0441\u0430\u043c.<\/p>\n<p>   1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0448\u043b\u044e\u0437\u0430 (\u0430\u0434\u0430\u043f\u0442\u0435\u0440 enp0s3)<\/p>\n<p>  <code>root@debian9:~# nano \/etc\/network\/interfaces<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\/etc\/network\/interfaces file<\/b><\/p>\n<div class=\"spoiler_text\"># This file describes the network interfaces available on your system<br \/>  # and how to activate them. For more information, see interfaces(5).<\/p>\n<p>  source \/etc\/network\/interfaces.d\/*<\/p>\n<p>  # The loopback network interface<br \/>  auto lo<br \/>  iface lo inet loopback<\/p>\n<p>  # The primary network interface<br \/>  allow-hotplug enp0s3<br \/>  iface enp0s3 inet static<br \/>  address 192.168.23.2<br \/>  netmask 255.255.255.0<br \/>  gateway 192.168.23.254<\/p>\n<p>  # The secondary network interface<br \/>  allow-hotplug enp0s8 <br \/>  iface enp0s8 inet static<br \/>  address 192.168.201.254<br \/>  netmask 255.255.255.0  <\/div>\n<\/div>\n<p>   2. \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0438\u0437 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 192.168.23.0\/24 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <\/p>\n<p>  <code>root@debian9:~# iptables -t nat -A PREROUTING -s 192.168.23.0\/24 -d 199.116.161.0\/24,199.116.162.0\/24,199.116.164.0\/23,208.85.40.0\/22,208.85.44.0\/24,208.85.46.0\/23 -p tcp -j REDIRECT --to-ports 888 <\/code><\/p>\n<p>  3. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <br \/>  <code>root@debian9:~# iptables-save &gt; \/etc\/iptables\/rules.v4<\/code><\/p>\n<p>  4. \u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Router network list<\/b><\/p>\n<div class=\"spoiler_text\">199.116.161.0 255.255.255.0 192.168.23.2<br \/>  199.116.162.0 255.255.255.0 192.168.23.2<br \/>  199.116.164.0 255.255.254.0 192.168.23.2<br \/>  208.85.40.0 255.255.252.0 192.168.23.2<br \/>  208.85.44.0 255.255.255.0 192.168.23.2<br \/>  208.85.46.0 255.255.254.0 192.168.23.2  <\/div>\n<\/div>\n<p>   <\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b\/\u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/h3>\n<p>  1. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b 3proxy <a href=\"https:\/\/3proxy.ru\/\">3proxy.ru<\/a><\/p>\n<p>  2. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 3proxy \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 <a href=\"http:\/\/www.ekzorchik.ru\/2015\/02\/how-to-take-your-socks-proxy\/\">www.ekzorchik.ru\/2015\/02\/how-to-take-your-socks-proxy<\/a><\/p>\n<p>  3. \u0412\u0435\u0442\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 3proxy \u043d\u0430 GitHub <a href=\"https:\/\/github.com\/z3APA3A\/3proxy\/issues\/274\">github.com\/z3APA3A\/3proxy\/issues\/274<\/a><\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/460469\/\"> https:\/\/habr.com\/ru\/post\/460469\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u043b\u0438\u0431\u043e \u0447\u0430\u0441\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u044b. <\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0440\u0435\u0448\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0442\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0451 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u0443 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u2014 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b HTTPS. \u0412 \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c HTTP \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e, \u043d\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 HTTPS \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0447\u0430\u0441\u0442\u044c\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0412 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445 \u043a \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 Squid \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u0430\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c, \u0447\u0442\u043e <s>\u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0440\u0435\u0434<\/s> \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a MITM \u2014 \u0430\u0442\u0430\u043a\u0430. \u042f \u0437\u043d\u0430\u044e, \u0447\u0442\u043e Squid \u0443\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u043e \u0440\u0435\u0447\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u043c \u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c 3proxy \u043e\u0442 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e 3APA3A.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 3proxy \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u043f\u043e\u043b\u043d\u043e\u0435 \u0438 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c NAT, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041e\u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Debian 9 x64. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c!  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-292223","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=292223"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292223\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}