{"id":271797,"date":"2016-01-08T23:34:02","date_gmt":"2016-01-08T20:34:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=271797"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=271797","title":{"rendered":"\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0448\u043b\u044e\u0437 \u0434\u043b\u044f \u0443\u0436\u0435 \u043d\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 (Shorewall, OpenVPN, OSPF). \u0427\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"<p>       \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0438\u0437 \u0441\u0435\u0440\u0438\u0438, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u00ab\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0449\u0438\u0445\u00bb \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u044f \u0432\u0440\u044f\u0434 \u043b\u0438 \u043e\u0442\u043a\u0440\u043e\u044e \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435.<br \/>  \u0412 \u044d\u0442\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0448\u043b\u044e\u0437\u0430 \u043d\u0430 linux, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0444\u0438\u0441\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0441\u0435\u0442\u044c, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0437\u0430\u0446\u0438\u044e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 (QoS) \u0438 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u043d\u0430\u043b\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438.<br \/>  \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:  <\/p>\n<ul>\n<li>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Shorewall<\/li>\n<li>\u0421\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 QoS<\/li>\n<li>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/li>\n<\/ul>\n<p>  \u0410 \u0432 <a href=\"http:\/\/habrahabr.ru\/post\/274639\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b:  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Shorewall<\/li>\n<li>\u0423\u0436\u0430\u0441\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 dnsmasq<\/li>\n<li>\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenVPN<\/li>\n<li>\u0418 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0449\u0438\u0445 \u0430\u0434\u043c\u0438\u043d\u043e\u0432 \u043d\u0435\u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 OSPF<\/li>\n<\/ul>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0412\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0438\u0436\u0435 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0434\u043b\u044f CentOS 7.1 (\u0438 \u0432\u044b\u0448\u0435, 6 \u0441\u0435\u0440\u0438\u044f \u0442\u043e\u0436\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442, \u043d\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438)<\/p>\n<h1>\u0423\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Shorewall<\/h1>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u0432\u0435\u0440\u0447\u0438\u0432\u044b\u0439 \u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u044b, \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0434\u0440\u0430\u0432\u043e\u0439 \u043f\u0430\u0440\u0430\u043d\u043e\u0439\u0438.<br \/>  \u042d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043d\u0435\u0441\u0435\u043c \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">policy<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/policy # # For information about entries in this file, type &quot;man shorewall-policy&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-policy.html # ############################################################################### #SOURCE\tDEST\tPOLICY\t\tLOG\tLIMIT:\t\tCONNLIMIT: #\t\t\t\tLEVEL\tBURST\t\tMASK $FW\tall\tREJECT grn\tall\tREJECT tun\tall\tREJECT red\tall\tDROP <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043b\u0430 \u043f\u0440\u043e\u0449\u0435, \u043d\u043e \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u043d\u043e, \u0444\u0430\u0439\u043b rules \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0443\u0445\u043d\u0435\u0442:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\/etc\/shorewall\/rules<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/rules # # For information on the settings in this file, type &quot;man shorewall-rules&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-rules.html # ###################################################################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\t\tORIGINAL\tRATE\t\tUSER\/\tMARK\tCONNLIMIT\tTIME\t\tHEADERS\t\tSWITCH\t\tHELPER #\t\t\t\t\t\t\tPORT(S)\tPORT(S)\t\tDEST\t\tLIMIT\t\tGROUP ?SECTION ALL ?SECTION ESTABLISHED ?SECTION RELATED ?SECTION INVALID ?SECTION UNTRACKED ?SECTION NEW  INCLUDE rules.fw INCLUDE rules.grn INCLUDE rules.red INCLUDE rules.red-dnat INCLUDE rules.tun <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u043e\u0439 INCLUDE \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0444\u0430\u0439\u043b\u0430\u043c:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">rules.fw<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/rules.fw # # For information on the settings in this file, type &quot;man shorewall-rules&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-rules.html # ###################################################################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\t\tORIGINAL\tRATE\t\tUSER\/\tMARK\tCONNLIMIT\tTIME\t\tHEADERS\t\tSWITCH\t\tHELPER #\t\t\t\t\t\t\tPORT(S)\tPORT(S)\t\tDEST\t\tLIMIT\t\tGROUP DNS(ACCEPT)\t$FW\t\tred Web(ACCEPT)\t$FW\t\tred FTP(ACCEPT)\t$FW\t\tred OpenVPN(ACCEPT)\t$FW\tred Ping(ACCEPT)\t$FW\tall OSPF(ACCEPT)\t$FW\ttun SSH(ACCEPT)\t$FW\t\tall  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">rules.grn<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/rules.grn # # For information on the settings in this file, type &quot;man shorewall-rules&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-rules.html # ###################################################################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\t\tORIGINAL\tRATE\t\tUSER\/\tMARK\tCONNLIMIT\tTIME\t\tHEADERS\t\tSWITCH\t\tHELPER #\t\t\t\t\t\t\tPORT(S)\tPORT(S)\t\tDEST\t\tLIMIT\t\tGROUP DNS(ACCEPT)\tgrn\t\t$FW Web(ACCEPT)\tgrn\t\tred FTP(ACCEPT)\tgrn\t\tred Ping(ACCEPT)\tgrn\tall SSH(ACCEPT)\tgrn\t\tall\t-\t-\t-\t-\ts:3\/min  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">rules.red<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/rules.red # # For information on the settings in this file, type &quot;man shorewall-rules&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-rules.html # ###################################################################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\t\tORIGINAL\tRATE\t\tUSER\/\tMARK\tCONNLIMIT\tTIME\t\tHEADERS\t\tSWITCH\t\tHELPER #\t\t\t\t\t\t\tPORT(S)\tPORT(S)\t\tDEST\t\tLIMIT\t\tGROUP OpenVPN(ACCEPT)\tred\t$FW SSH(ACCEPT)\tred\t\t$FW\t-\t-\t-\t-\ts:3\/min  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">rules.tun<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/rules.tun # # For information on the settings in this file, type &quot;man shorewall-rules&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-rules.html # ###################################################################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\t\tORIGINAL\tRATE\t\tUSER\/\tMARK\tCONNLIMIT\tTIME\t\tHEADERS\t\tSWITCH\t\tHELPER #\t\t\t\t\t\t\tPORT(S)\tPORT(S)\t\tDEST\t\tLIMIT\t\tGROUP Ping(ACCEPT)\ttun\t$FW OSPF(ACCEPT)\ttun $FW SSH(ACCEPT)\ttun\t\t$FW\t-\t-\t-\t-\ts:3\/min SSH(ACCEPT)\ttun\t\tgrn\t-\t-\t-\t-\ts:3\/min  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0434 \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c, \u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f SSH, \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0434\u043e 3-\u0445 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443, \u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e ip \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430. \u041d\u043e \u043d\u0430\u0434\u043e \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b\u043c \u0441 \u044d\u0442\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c, \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0432 \u043a\u043b\u044e\u0447 s: \u0438\u043b\u0438 d:, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0430\u044e\u0449\u0438\u043c\u0441\u044f DDoS \u0430\u0442\u0430\u043a\u0435. \u0410 \u0434\u043b\u044f Web \u0442\u0440\u0430\u0444\u0438\u043a\u0430 (\u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043b\u044e\u0431\u043e\u0433\u043e), \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u0434\u0435\u0442\u044c \u0437\u0430 NAT, \u0438 \u0442\u043e\u0433\u0434\u0430 \u043e\u0434\u0438\u043d IP, \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u043c\u043e\u0436\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<br \/>  \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u043e\u0440\u0442\u044b \u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">rules.red-dnat<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/rules.red-dnat # # For information on the settings in this file, type &quot;man shorewall-rules&quot; # # The manpage is also online at # http:\/\/www.shorewall.net\/manpages\/shorewall-rules.html # ###################################################################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\t\tORIGINAL\tRATE\t\tUSER\/\tMARK\tCONNLIMIT\tTIME\t\tHEADERS\t\tSWITCH\t\tHELPER #\t\t\t\t\t\t\tPORT(S)\tPORT(S)\t\tDEST\t\tLIMIT\t\tGROUP Web(DNAT)\tred\tgrn:172.16.0.2 #\u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c DNAT \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445: #Web(DNAT)\tred\tgrn:172.16.0.2\t-\t-\t-\t192.168.10.37 #\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0432\u0441\u0435 \u0440\u0443\u043a\u0430\u043c\u0438: #DNAT\t\tred\t\t\tgrn:172.16.0.2\ttcp\t80,443 #DNAT\t\tred\t\t\tgrn:172.16.0.2\ttcp\t80,443\t-\t192.168.10.37 #\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043f\u043e\u0440\u0442\u0430\u043c\u0438: #DNAT\t\tred\t\t\tgrn:172.16.0.2:80\ttcp\t8080 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h1>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Shorewall<\/h1>\n<p>  \u0421\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443, \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Shorewall, \u0441\u0430\u043c \u043e\u043d \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043f\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u043f\u0430\u0436\u0438 \u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<br \/>  \u0412\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">providers<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/providers # # For information about entries in this file, type &quot;man shorewall-providers&quot; # # For additional information, see http:\/\/shorewall.net\/MultiISP.html # ############################################################################################ #NAME\tNUMBER\tMARK\tDUPLICATE\tINTERFACE\tGATEWAY\t\tOPTIONS\t\tCOPY pr1\t1\t0x10000\t-\t\t$IF_RED1\t$GW_RED1\tfallback=1 pr2\t2\t0x20000\t-\t\t$IF_RED2\t$GW_RED2\tfallback=4 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442, \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u0430 \u0441\u0435\u043a\u0446\u0438\u044f \u0438\u0437 \u00abShorewall.conf\u00bb. \u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438. \u0422\u0430\u043c \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438, \u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u0442\u044b \u0438\u0437 \u043c\u0435\u0442\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430, \u0437\u0430\u0434\u0430\u044e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0442\u043a\u0438 (\u044f \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u043d\u043e Shorewall \u0441\u0430\u043c \u0438\u0445 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442, \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434), \u0430 \u043a\u0430\u043a\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439.<br \/>  \u0422\u0443\u0442 \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432, \u0437\u0430\u0434\u0430\u043b\u0438 \u043a\u0430\u043a \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u043d\u0438\u0445, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u0434\u0438\u0442 \u0438 \u043a\u0430\u043a\u043e\u0439 \u0443 \u043a\u043e\u0433\u043e \u0448\u043b\u044e\u0437.<br \/>  \u0412\u043e\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 OPTIONS, \u043d\u0430\u0434\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0422\u0443\u0442 \u043a\u043b\u044e\u0447 fallba\u0441k \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 (\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u043b\u0435\u0433 \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443), \u0430 \u0446\u0438\u0444\u0435\u0440\u043a\u0430 \u0437\u0430\u0434\u0430\u0435\u0442 \u0432\u0435\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0427\u0435\u043c \u0432\u0435\u0441 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0447\u0430\u0449\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u0442\u043e\u0433\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441, \u0443 \u043a\u043e\u0433\u043e \u0432 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438 \u0432\u0435\u0441 \u0432\u044b\u0448\u0435, \u0442\u0443\u0434\u0430 \u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u0447\u0430\u0449\u0435, \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u0430 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f). \u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 roundrobin \u0443\u0436\u0435 \u0441\u0430\u043c\u0438\u043c \u044f\u0434\u0440\u043e\u043c \u0438 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0444\u0430\u043a\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440 (\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432\u0430\u0448 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442: \u043a\u0442\u043e-\u0442\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u043a\u0435, \u043f\u043e\u043b\u0435\u0437 \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043d\u0430 \u043d\u0435\u043a\u0438\u0439 \u0441\u0430\u0439\u0442 (\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0434\u0438\u043d IP), \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0448\u0435\u043b \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 1, \u0437\u0430\u0442\u0435\u043c \u043a\u0442\u043e-\u0442\u043e \u0435\u0449\u0435 \u043f\u043e\u043b\u0435\u0437 \u0442\u0443\u0434\u0430 \u0436\u0435, \u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0431\u0435\u0436\u0438\u0442 \u043e\u043f\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 1 (\u0435\u0441\u043b\u0438 \u043a\u044d\u0448 \u043d\u0435 \u0443\u0441\u043f\u0435\u043b \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f). \u0415\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b, \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043d\u043e \u0442\u0430\u043a \u043f\u043e\u0432\u0435\u0437\u0435\u0442, \u043a\u0430\u0436\u0434\u043e\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438 \u0441\u0430\u043c\u044b\u043c \u00ab\u0442\u044f\u0436\u0435\u043b\u044b\u043c\u00bb, \u0430 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c\u2026 \u0422\u0443\u0442 \u0443\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u0430\u043c \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442.<br \/>  \u041d\u043e, \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u0438 \u0434\u0430\u0436\u0435 \u0442\u0430\u043a \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e (\u043a \u0441\u043b\u043e\u0432\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u0430\u043a \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u00ab\u0447\u0435\u0441\u0442\u043d\u043e\u0439\u00bb \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u0435\u0437 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 (\u043e\u0431\u043e\u0438\u0445) \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442).<br \/>  \u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">params<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/params # # Assign any variables that you need here. # # It is suggested that variable names begin with an upper case letter # to distinguish them from variables used internally within the # Shorewall programs # # Example: # #\tNET_IF=eth0 #\tNET_BCAST=130.252.100.255 #\tNET_OPTIONS=routefilter,norfc1918 # # Example (\/etc\/shorewall\/interfaces record): # #\tnet\t$NET_IF\t\t$NET_BCAST\t$NET_OPTIONS # # The result will be the same as if the record had been written # #\tnet\teth0\t\t130.252.100.255\troutefilter,norfc1918 # ############################################################################### IF_RED1=eth0 GW_RED1=192.168.10.1 IF_RED2=eth2 GW_RED2=detect IF_GRN=eth1 NET_GRN=172.16.0.0\/23 IF_TUN=tap+ #LAST LINE -- DO NOT REMOVE <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0448\u043b\u044e\u0437 \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u0430\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u00abdetect\u00bb, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u0445 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0435\u0439. \u0414\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 PPtP), \u0441\u0430\u043c Shorewall \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0448\u043b\u044e\u0437, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0441 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">findgw<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall version 4 - Findgw File # # \/etc\/shorewall\/findgw # # The code in this file is executed when Shorewall is trying to detect the # gateway through an interface in \/etc\/shorewall\/providers that has GATEWAY # specified as 'detect'. # # The function should echo the IP address of the gateway if it knows what # it is; the name of the interface is in $1. # # See http:\/\/shorewall.net\/shorewall_extension_scripts.htm for additional # information. # ############################################################################### LANG='C' nmcli --terse --fields IP6.GATEWAY device show ${1} | cut -f2- -d':' #IPv6 LANG='C' nmcli --terse --fields IP4.GATEWAY device show ${1} | cut -f2- -d':' #IPv4 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442 \u0432\u0441\u0435 \u044d\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f NetworkManager (\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435).  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\/etc\/NetworkManager\/dispatcher.d\/30-shorewall.sh<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#!\/bin\/bash   IF=$1      # \u0438\u043c\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 STATUS=$2  # \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 function check_prov() { \tPARAM=$(grep -v '^#' \/etc\/shorewall\/params | grep $1 | cut -d '=' -f 1) \tif [ -z &quot;$PARAM&quot; ]; then \t\tgrep -v '^#' \/etc\/shorewall\/providers | grep -q $1 \t\t[[ $? == 0 ]] && shorewall restart \telse \t\tgrep -v '^#' \/etc\/shorewall\/providers | grep -q $PARAM \t\t[[ $? == 0 ]] && shorewall restart \tfi } case $STATUS in \tup) \t\t# \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \t\tshorewall enable $IF \t\tshorewall6 enable $IF \t\tcheck_prov $IF \t;; \tdown) \t\t# \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0440\u044b\u0432\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \t\tshorewall disable $IF \t\tshorewall6 disable $IF \t\tcheck_prov $IF \t;; esac <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u043e, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443? \u041e\u0442\u0432\u0435\u0442 \u0414\u0430!  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">mangle<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/mangle # # For information about entries in this file, type &quot;man shorewall-mangle&quot; # # See http:\/\/shorewall.net\/traffic_shaping.htm for additional information. # For usage in selecting among multiple ISPs, see # http:\/\/shorewall.net\/MultiISP.html # # See http:\/\/shorewall.net\/PacketMarking.html for a detailed description of # the Netfilter\/Shorewall packet marking mechanism. # #################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\tUSER\tTEST\tLENGTH\tTOS\tCONNBYTES\tHELPER\tPROBABILITY\tDSCP #\t\t\t\t\t\t\tPORT(S)\tPORT(S) MARK(0x20000):P\t172.16.0.4\t0.0.0.0\/0!172.16.0.0\/12 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u043f\u043e\u043c\u0435\u0442\u0438\u043b\u0438 \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u0442 172.16.0.4 \u0432 \u043b\u044e\u0431\u0443\u044e \u0441\u0435\u0442\u044c, \u043a\u0440\u043e\u043c\u0435 172.16.0.0\/12, \u043c\u0435\u0442\u043a\u043e\u0439 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u0445\u0438\u0442\u0440\u0435\u0435, \u043d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0434\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0448\u043b\u044e\u0437\u0435, \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c &quot;:P&quot;.<\/p>\n<h1>\u0421\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0438 \u0443\u0436\u0430\u0441\u043d\u044b\u0439 QoS<\/h1>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043d\u0430\u0434\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u0432\u043e\u0442 \u0447\u0442\u043e: \u043f\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435. \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a, \u0443\u0436\u0435 \u0434\u043e\u0448\u0435\u043b \u0434\u043e \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u0438\u043d\u0443\u044f \u0432\u0441\u0435 \u0443\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430, \u0438 \u0442\u043e\u043b\u043a\u0430\u044f\u0441\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u0445, \u0437\u0430 \u043f\u0440\u0430\u0432\u043e \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043f\u043e\u0440\u043e\u0433\u0435.<br \/>  \u041d\u043e \u043e\u0442\u0447\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u043d\u043e, \u0438 \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0438\u0437\u044f\u0449\u043d\u044b\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0435, \u043a\u0430\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b, \u043d\u043e \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0412 \u0441\u0435\u0442\u044f\u0445 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 IP, \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u043b\u0430\u0432\u043d\u043e \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u043f\u043e\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u044b \u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435 (\u043f\u0430\u043a\u0435\u0442\u044b ACK \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 TCP) \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0438\u043b\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438 \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u0442\u043e\u043c, \u0441\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u0434\u043d\u044f\u0442\u044c. \u0418 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438.<br \/>  \u0410 \u043a\u0430\u043a \u0436\u0435 UDP? \u0410 \u0441 \u043d\u0438\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u043d\u0435\u0442 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u041e\u041a (\u044d\u0442\u043e \u043f\u0443\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u043c\u0443\u0447\u0430\u0435\u0442\u0441\u044f).<br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0435 UDP \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043f\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0443, \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 (\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0441\u0432\u043e\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 TCP, \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0432\u0435\u0440\u0445 UDP, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c. \u0427\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a UDP \u0432\u043e \u0432\u0441\u044e \u043c\u043e\u0449\u044c, \u0437\u0430\u0431\u0438\u0432\u0430\u044f \u043a\u0430\u043d\u0430\u043b \u0441\u0432\u044f\u0437\u0438 \u0446\u0435\u043b\u0438 (\u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 DDoS).<br \/>  \u041a\u0430\u043a \u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0437\u0430\u0446\u0438\u044e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0441\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430? \u041e\u0442\u0432\u0435\u0442 \u0435\u0441\u0442\u044c \u0432\u044b\u0448\u0435: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 (\u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 ACK) \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u0435\u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0430, \u043f\u0430\u043a\u0435\u0442 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c.<\/p>\n<p>  \u0412 Linux \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u0441\u0435\u0432\u0434\u043e-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 IFB, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a \u0431\u044b \u0432\u0441\u0442\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0438 \u0441\u0430\u043c\u0438\u043c \u0448\u043b\u044e\u0437\u043e\u043c, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0431\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a. \u0422\u0440\u0430\u0444\u0438\u043a \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u043c\u044b \u0435\u0433\u043e \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0430 \u043d\u0435\u043c), \u0438 \u0442\u0443\u0442 \u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 IFB, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442, \u0441 \u043a\u0430\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0440\u0430\u0444\u0438\u043a (\u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c).<br \/>  \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 Shorewall (\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \/etc\/modprobe.d \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c):  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\/etc\/shorewall\/init<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/init # # Add commands below that you want to be executed at the beginning of # a &quot;shorewall start&quot;, &quot;shorewall-reload&quot; or &quot;shorewall restart&quot; command. # # For additional information, see # http:\/\/shorewall.net\/shorewall_extension_scripts.htm # ############################################################################### modprobe ifb numifbs=3 ip link set ifb0 up ip link set ifb1 up ip link set ifb2 up <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0443\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0442\u0440\u0438 \u043f\u0441\u0435\u0432\u0434\u043e-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 IFB \u0438 \u0438\u0445 \u043f\u043e\u0434\u043d\u044f\u043b\u0438.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0438\u0448\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">tcdevices<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/tcdevices # # For information about entries in this file, type &quot;man shorewall-tcdevices&quot; # # See http:\/\/shorewall.net\/traffic_shaping.htm for additional information. # ############################################################################### #NUMBER:\tIN-BANDWITH\tOUT-BANDWIDTH\tOPTIONS\t\tREDIRECTED #INTERFACE\t\t\t\t\t\t\tINTERFACES 1:$NET_GRN\t-\t\t1000mbit\thfsc,classify 2:ifb1\t\t-\t\t1000mbit\thfsc,classify\t$NET_GRN 3:$NET_RED1\t-\t\t10mbit\t\thfsc,classify 4:ifb0\t\t-\t\t10mbit\t\thfsc,classify\t$NET_RED1 5:$NET_RED2\t-\t\t10mbit\t\thfsc,classify 6:ifb2\t\t-\t\t10mbit\t\thfsc,classify\t$NET_RED2 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0437\u0430\u0434\u0430\u0435\u043c \u043d\u043e\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u0442\u044c, Shorewall \u043f\u0440\u043e\u043d\u0443\u043c\u0435\u0440\u0443\u0435\u0442 \u0438\u0445 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0435), \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u0438 IFB \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438, \u0437\u0430\u0434\u0430\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c (\u043f\u043e\u043c\u043d\u0438\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0451 \u043c\u044b \u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u043c, \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 ifb \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043b\u0438\u043d\u0438\u044f) \u0438 \u0437\u0430\u0434\u0430\u043b\u0438 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0447\u0442\u043e \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<br \/>  \u041e\u043f\u0438\u0448\u0435\u043c \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/tcclasses # # For information about entries in this file, type &quot;man shorewall-tcclasses&quot; # # See http:\/\/shorewall.net\/traffic_shaping.htm for additional information. # ############################################################################### #INTERFACE:CLASS\tMARK\tRATE:\t\tCEIL\tPRIORITY\tOPTIONS #\t\t\t\tDMAX:UMAX 1:1:2\t\t\t-\t1mbit\t\t3mbit\t2\t\tdefault 1:1:3\t\t\t-\t256kbit\t\tfull\t1 2:1:2\t\t\t-\t1mbit\t\t3mbit\t2\t\tdefault 2:1:3\t\t\t-\t256kbit\t\tfull\t1 3:1:2\t\t\t-\t1mbit\t\t3mbit\t2\t\tdefault 4:1:3\t\t\t-\t256kbit\t\tfull\t1 5:1:2\t\t\t-\t1mbit\t\t3mbit\t2\t\tdefault 5:1:3\t\t\t-\t256kbit\t\tfull\t1 6:1:2\t\t\t-\t1mbit\t\t3mbit\t2\t\tdefault 6:1:3\t\t\t-\t256kbit\t\tfull\t1 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e (\u0438 \u043e\u0442\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e), \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f IFB) \u043f\u043e \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430.<br \/>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u043c\u044b \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438. &lt;\u043d\u043e\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430&gt;:&lt;\u043d\u043e\u043c\u0435\u0440 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430&gt;:&lt;\u043d\u043e\u043c\u0435\u0440 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430&gt;.<br \/>  \u041d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 1, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 tcdevices.<br \/>  \u0414\u0430\u043b\u0435\u0435, \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u044b \u043d\u0435 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u043e\u0441\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u043d\u0438\u044f, \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f (\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0432\u0430\u044f \u0443 \u043a\u043b\u0430\u0441\u0441\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f), \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0437\u0430\u0434\u0430\u0441\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043f\u043e\u0440\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 (\u0443 \u043a\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0442\u043e\u0442 \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b\u0448\u0435\u043b \u0437\u0430 \u043f\u0440\u0438\u0434\u0435\u043b\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u044b, \u0438 \u043e\u043d\u0430 \u0443\u0436\u0435 \u043a\u0435\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0437\u0430\u043d\u044f\u0442\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e). \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438\u0434\u0443\u0442 \u043e\u043f\u0446\u0438\u0438, default \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e (\u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0435 \u043e\u0442\u043d\u0435\u0441\u0435\u043d\u044b \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c), \u0442\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e).<br \/>  \u0414\u0430\u043b\u044c\u0448\u0435, \u0442\u0430\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">mangle<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/mangle # # For information about entries in this file, type &quot;man shorewall-mangle&quot; # # See http:\/\/shorewall.net\/traffic_shaping.htm for additional information. # For usage in selecting among multiple ISPs, see # http:\/\/shorewall.net\/MultiISP.html # # See http:\/\/shorewall.net\/PacketMarking.html for a detailed description of # the Netfilter\/Shorewall packet marking mechanism. # #################################################################################################################################################### #ACTION\t\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\tUSER\tTEST\tLENGTH\tTOS\tCONNBYTES\tHELPER\tPROBABILITY\tDSCP #\t\t\t\t\t\t\tPORT(S)\tPORT(S) CLASSIFY(1:3)\t0.0.0.0\/0\t0.0.0.0\/0\ttcp\t-\t80,443 CLASSIFY(3:3)\t0.0.0.0\/0\t0.0.0.0\/0\ttcp\t80,443 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0410 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 IFB \u0432:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">tcfilters<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"># # Shorewall -- \/etc\/shorewall\/tcfilters # # For information about entries in this file, type &quot;man shorewall-tcfilters&quot; # # See http:\/\/shorewall.net\/traffic_shaping.htm for additional information. # ######################################################################################################## #INTERFACE:\tSOURCE\t\tDEST\t\tPROTO\tDEST\tSOURCE\tTOS\t\tLENGTH\tPRIORITY #CLASS\t\t\t\t\t\t\tPORT(S)\tPORT(S) 2:3\t\t0.0.0.0\/0\t0.0.0.0\/0\ttcp\t-\t80,443 4:3\t\t0.0.0.0\/0\t0.0.0.0\/0\ttcp\t80,443 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, \u044f \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u0442 HTTP(S) \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 3 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0438 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441 \u043d\u0438\u043c, \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u043e \u00ab\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0432 \u043f\u043e\u0440\u0442\u044b\u00bb. \u041e\u0447\u0435\u043d\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0438\u0442\u0435\u0441\u044c \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043e \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b, \u0438 \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043d\u0430\u0434\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b, \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440.<br \/>  \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442, \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0442\u0440\u0435\u0449\u0430\u0442\u044c \u043a\u0440\u044b\u0448\u0430. \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 (\u043f\u0440\u043e\u0448\u0443 \u043d\u043e\u0433\u0430\u043c\u0438 \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0431\u0438\u0442\u044c, \u0432 Visio \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u043a\u043e\u043c \u043d\u0435 \u0443\u043c\u0435\u044e).<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a2d\/8cf\/b71\/a2d8cfb71e8f4f0a86771cfea7f2452b.png\"\/><br \/>  \u0420\u0435\u0437\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u0438\u0442\u043e\u0433\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u0445, \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f IFB, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440, \u0430 \u0441\u0430\u043c \u0448\u043b\u044e\u0437, \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 (\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u043c). \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u0448\u043b\u044e\u0437 \u0441\u0430\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a (\u043e\u043d \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 VPN), \u0442\u043e\u0433\u0434\u0430 \u0431\u0435\u0437 IFB \u0432\u044b\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043b\u0435\u0433\u043a\u043e.<\/p>\n<p>  \u041f.\u0421.<br \/>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0430 QoS, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0441\u0432\u0435\u0442\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f VoIP \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u0422\u0435\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u043d\u044c\u043a\u043e \u0441\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0435\u043a\u0438\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043f\u0438\u0448\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u044f \u0443\u0447\u0442\u0443 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.        \t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u041f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u043b\u0438 \u044d\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438? (\u041c\u043e\u0442\u0438\u0432\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043e\u043f\u0440\u043e\u0441)<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"274677\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"14435\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv70707\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"70707\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv70707\">\u0414\u0430<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv70709\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"70709\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv70709\">\u0421\u043a\u043e\u0440\u0435\u0435 \u0434\u0430<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv70711\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"70711\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv70711\">\u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv70713\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"70713\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv70713\">\u041d\u0435\u0442<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"https:\/\/habrahabr.ru\/auth\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/274677\/\"> http:\/\/habrahabr.ru\/post\/274677\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0438\u0437 \u0441\u0435\u0440\u0438\u0438, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u00ab\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0449\u0438\u0445\u00bb \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u044f \u0432\u0440\u044f\u0434 \u043b\u0438 \u043e\u0442\u043a\u0440\u043e\u044e \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435.<br \/>  \u0412 \u044d\u0442\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0448\u043b\u044e\u0437\u0430 \u043d\u0430 linux, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0444\u0438\u0441\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0441\u0435\u0442\u044c, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0437\u0430\u0446\u0438\u044e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 (QoS) \u0438 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u043d\u0430\u043b\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438.<br \/>  \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:  <\/p>\n<ul>\n<li>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Shorewall<\/li>\n<li>\u0421\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 QoS<\/li>\n<li>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/li>\n<\/ul>\n<p>  \u0410 \u0432 <a href=\"http:\/\/habrahabr.ru\/post\/274639\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b:  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Shorewall<\/li>\n<li>\u0423\u0436\u0430\u0441\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 dnsmasq<\/li>\n<li>\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenVPN<\/li>\n<li>\u0418 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0449\u0438\u0445 \u0430\u0434\u043c\u0438\u043d\u043e\u0432 \u043d\u0435\u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 OSPF<\/li>\n<\/ul>\n<p>  <\/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-271797","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271797","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=271797"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271797\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=271797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=271797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=271797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}