{"id":495,"date":"2024-03-28T18:39:13","date_gmt":"2024-03-28T15:39:13","guid":{"rendered":"https:\/\/im-cloud.site\/?p=495"},"modified":"2024-03-29T14:08:41","modified_gmt":"2024-03-29T11:08:41","slug":"%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-firewall-mikrotik","status":"publish","type":"post","link":"https:\/\/cloud-life.site\/?p=495","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 FIREWALL MikroTik"},"content":{"rendered":"\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0440\u043e\u043f\u0430\u0435\u043c \u0432\u0441\u0451 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u0438 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u043a <strong>invalid connection<\/strong>, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 <strong>\u043c\u043e\u0439 DNS<\/strong>, \u043b\u0438\u0441\u0442\u044b <strong>DROP <\/strong>\u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<br>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0441\u043a\u0430\u043d\u0435\u0440\u0430 \u043f\u043e\u0440\u0442\u043e\u0432, \u043e\u0442 <strong>DDoS <\/strong>\u0438 <strong>Syn <\/strong>\u0430\u0442\u0430\u043a \u0438 \u0442.\u0434.<br>\u0421\u043b\u0435\u0434\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0437\u0430\u043f\u0440\u0435\u0442 \u043d\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043f\u043e VPN&#8230;.<br>\u041f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<br>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u043f\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u044b\u0448\u0435.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442\u044b:<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">&gt;\/ip firewall filter add chain=input psd=21,3s,3,1 action=add-src-to-address-list address-list=psd<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/ip firewall raw add chain=prerouting src-address-list=psd action=drop<\/code><\/pre>\n\n\n\n<p><br>\u0422\u0430\u043a \u043c\u044b \u0434\u0440\u043e\u043f\u043d\u0435\u043c \u0435\u0433\u043e \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 DDoS<\/h2>\n\n\n\n<p>1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/ip firewall address-list<\/code><\/pre>\n\n\n\n<p>2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add list=ddos-attackers<\/code><\/pre>\n\n\n\n<p>3<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add list=ddos-target<\/code><\/pre>\n\n\n\n<p>4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/ip settings set tcp-syncookies=yes<\/code><\/pre>\n\n\n\n<p>5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/ip firewall filter<\/code><\/pre>\n\n\n\n<p>6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add chain=forward connection-state=new action=jump jump-target=detect-ddos<\/code><\/pre>\n\n\n\n<p>7<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=return chain=detect-ddos dst-limit=32,32,src-and-dst-addresses\/10s<\/code><\/pre>\n\n\n\n<p>8<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=return chain=detect-ddos dst-limit=32,32,src-and-dst-addresses\/10s protocol=tcp tcp-flags=syn,ack<\/code><\/pre>\n\n\n\n<p>9<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">add action=add-dst-to-address-list address-list=ddos-target address-list-timeout=10m chain=detect-ddos<\/code><\/pre>\n\n\n\n<p>10<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">add action=add-src-to-address-list address-list=ddos-attackers address-list-timeout=10m chain=detect-ddos<\/code><\/pre>\n\n\n\n<p>11<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\/ip firewall raw<\/code><\/pre>\n\n\n\n<p>12<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">add action=drop chain=prerouting dst-address-list=ddos-target src-address-list=ddos-attackers<\/code><\/pre>\n\n\n\n<p><strong><em>1-3 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0432\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u043f\u0430\u043c\u0435\u0440\u044b \u0438 \u0436\u0435\u0440\u0442\u0432\u044b (\u0432\u0435\u0434\u044c \u0441\u043f\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0438 \u043d\u0435 \u043d\u0430 \u0432\u0430\u0441, \u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441).<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>4 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u044d\u0448 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f SYN-ACK \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>5-10 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u043a\u0442\u043e \u0438 \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441 \u0441\u043f\u0430\u043c\u0438\u0442\u044c \u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043c\u0430\u043b\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0441\u043f\u0430\u043c, \u0442\u043e \u043f\u0430\u043a\u0435\u0442\u0438\u043a \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u043c \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>11-12 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u043f\u0440\u0435\u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u0430\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f.<\/em><\/strong><\/p>\n\n\n\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0436\u0435\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0442\u044e\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0445\u0435\u043c\u0443 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 &#8212; \u0443 \u0432\u0441\u0435\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0440\u0430\u0437\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432 <strong>IP -&gt; Firewal<\/strong>l \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445. \u0423 \u043c\u0435\u043d\u044f \u0435\u0449\u0435 \u0432\u044b\u0448\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0441\u0442\u043e\u044f\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <strong>BLOCK <\/strong>\u0438 <strong>WhiteList <\/strong>&#8212; \u0433\u0434\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a &#8212; \u044d\u0442\u043e \u0442\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f, \u0430 \u0431\u0435\u043b\u044b\u0439 &#8212; \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0438\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430. \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u044d\u0442\u0438 4 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u043d\u0438\u044e \u0444\u043b\u0443\u0434\u0430, \u0430 \u0434\u0430\u043b\u0435\u0435 \u0443\u0436\u0435 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u043e\u043c \u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e firewall-\u0430<\/h2>\n\n\n\n<p>\u0412\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 FW<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/ip firewall filter<\/code><\/pre>\n\n\n\n<p>\u041f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443, \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437. \u0415\u0441\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443, \u0442\u043e \u043e\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0430\u0436\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 &#8212; \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 (<strong>established<\/strong>) \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 (<strong>related<\/strong>) \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u0435\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0438 <strong>input <\/strong>&#8212; \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u0430.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=accept chain=input comment=\"accept establish &amp; related\" connection-state=established,related<\/code><\/pre>\n\n\n\n<p>\u041e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 (Invalid) \u043f\u0430\u043a\u0435\u0442\u044b<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=drop chain=input comment=\"drop invalid\" connection-state=invalid<\/code><\/pre>\n\n\n\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c ICMP (ping). \u0423 \u043c\u0435\u043d\u044f \u043e\u043d \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442 (drop) <br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\"> add action=accept chain=input comment=\"accept ICMP\" protocol=icmp<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0438 input, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0435 \u043d\u0435 \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0412 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443 \u043c\u0435\u043d\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043a \u0431\u0440\u0438\u0434\u0436\u0443 bridge1-lan. \u0412 \u043d\u0435\u0433\u043e \u0432\u0445\u043e\u0434\u044f\u0442 \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043b\u043e\u043a\u0430\u043b\u043a\u0443.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=drop chain=input comment=\"drop all not from lan\" in-interface=!bridge1-lan<\/code><\/pre>\n\n\n\n<p>\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u044b \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0438 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0432\u043d\u0435 \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443, \u043a\u0440\u043e\u043c\u0435 \u043f\u0438\u043d\u0433\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043f\u043e\u043b\u043d\u044b\u0439. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 <strong>forward<\/strong>. \u0417\u0434\u0435\u0441\u044c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 <strong>input <\/strong>\u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0438\u0434\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f <strong>established<\/strong>, <strong>related<\/strong>, <strong>invalid <\/strong>\u043f\u0430\u043a\u0435\u0442\u043e\u0432.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=accept chain=forward comment=\"accept established,related\" connection-state=established,related<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=drop chain=forward comment=\"drop invalid\" connection-state=invalid<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u0438, \u0441\u0432\u044f\u0437\u044c \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 ether1-wan \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. dstnat \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441 \u043f\u043e\u0440\u0442\u043e\u0432, \u043e \u043d\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u0430.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=drop chain=forward comment=\"drop all from WAN to LAN\" connection-nat-state=!dstnat connection-state=new in-interface=ether1-wan<\/code><\/pre>\n\n\n\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c 80 \u0438 443 \u043f\u043e\u0440\u0442\u044b \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438:<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=accept chain=forward comment=\"accept http &amp; https from LAN\" dst-port=80,443 in-interface=bridge1-lan out-interface=ether1-wan protocol=tcp<\/code><\/pre>\n\n\n\n<p>\u0418 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c 53 (DNS) \u043f\u043e\u0440\u0442<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=accept chain=forward comment=\"accept dns from LAN\" dst-port=53 in-interface=bridge1-lan out-interface=ether1-wan protocol=udp<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add action=drop chain=forward comment=\"drop all from LAN to WAN\" in-interface=bridge1-lan out-interface=ether1-wan<\/code><\/pre>\n\n\n\n<p><strong><em>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e HTTP \u0438 HTTPS \u043f\u043e\u0440\u0442\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0438\u043d\u0430\u0447\u0435 \u0434\u043e \u043d\u0435\u0433\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0435 \u0434\u043e\u0439\u0434\u0435\u0442)<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e FireWall \u0432 MikroTik \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u0441\u0451. \u041d\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0435 \u043d\u0430\u0434\u043e, \u044d\u0442\u043e \u0436\u0435 \u043d\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e!<\/p>\n","protected":false},"author":1,"featured_media":499,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mikrotik"],"_links":{"self":[{"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/posts\/495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloud-life.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=495"}],"version-history":[{"count":4,"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/posts\/495\/revisions"}],"predecessor-version":[{"id":835,"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/posts\/495\/revisions\/835"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloud-life.site\/index.php?rest_route=\/wp\/v2\/media\/499"}],"wp:attachment":[{"href":"https:\/\/cloud-life.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloud-life.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloud-life.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}