{"id":1567,"date":"2011-08-31T11:07:44","date_gmt":"2011-08-31T08:07:44","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=1567"},"modified":"2016-01-02T22:06:52","modified_gmt":"2016-01-02T20:06:52","slug":"pf","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=1567","title":{"rendered":"[pf] \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u0440\u0435\u0441\u0430"},"content":{"rendered":"<p>\u0423 <strong>pf<\/strong> \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432 \u043f\u0440\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b. \u0418\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a <strong>IP<\/strong> \u0430\u0434\u0440\u0435\u0441\u0443, \u0430 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e<\/p>\n<p><em><span style=\"color: #993300;\">&#8211; \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/span><\/em><br \/>\n<em><span style=\"color: #993300;\"> &#8211; \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 <strong>IP<\/strong> \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0435\u0442 \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/span><\/em><\/p>\n<p><!--more-->\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430. <strong>$int_name<\/strong> &#8211; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430<\/p>\n<p><strong><span style=\"color: #ff6600;\">($int_name)<\/span><\/strong> &#8211; \u0441\u043a\u043e\u0431\u043a\u0438 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442, \u0447\u0442\u043e PF \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f IP \u0430\u0434\u0440\u0435\u0441\u0430. \u041e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441<\/p>\n<p><strong><span style=\"color: #ff6600;\">$int_name:network<\/span><\/strong> &#8211;\u00a0\u0417\u0430\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0442\u044c\u044e <strong>CIDR<\/strong> \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0451\u043d\u043d\u043e\u0439 \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/p>\n<p><strong><span style=\"color: #ff6600;\">$int_name:broadcast<\/span><\/strong> &#8211;\u00a0\u0417\u0430\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0451\u043d\u043d\u044b\u043c \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/p>\n<p><strong><span style=\"color: #ff6600;\">$int_name:peer<\/span><\/strong> &#8211; \u0417\u0430\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0430 \u0434\u043b\u044f <strong>point-to-point<\/strong> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0430\u0434\u0440\u0435\u0441 \u0448\u043b\u044e\u0437\u0430 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 <strong>pptp<\/strong><\/p>\n<p><strong><span style=\"color: #ff6600;\">self<\/span><\/strong> &#8211; \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043e\u043a <strong>IP<\/strong>-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <strong>loopback<\/strong><\/p>\n<p><strong><span style=\"color: #ff6600;\">(self)<\/span><\/strong> &#8211; \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e <strong>&#8220;{ (\u043f\u0435\u0440\u0432\u044b\u0439_\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441) (\u0432\u0442\u043e\u0440\u043e\u0439_\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441) &#8230; (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439_\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441) }&#8221;<\/strong>, \u0442.\u0435. \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432\u0441\u0435\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432.<\/p>\n<p><strong><span style=\"color: #ff6600;\">:0<\/span><\/strong>\u00a0(\u0446\u0438\u0444\u0440\u0430 \u043d\u043e\u043b\u044c) &#8211;\u00a0\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0438\u043b\u0438 \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0438\u0437 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0447\u0442\u043e <strong>PF<\/strong> \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0442\u044c <strong>alias IP<\/strong> \u0430\u0434\u0440\u0435\u0441\u0430. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445. \u041f\u0440\u0438\u043c\u0435\u0440:\u00a0<strong>fxp0:network:0<\/strong><\/p>\n<p><strong><span style=\"color: #ff6600;\">tun<\/span><\/strong> &#8211; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 <strong>tun1, &#8230;, tunN<\/strong><\/p>\n<p><strong><span style=\"color: #ff0000;\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/span><\/strong><\/p>\n<p><code>pass in on ($int_name)<br \/>\nblock in proto icmp on $int_name:network<br \/>\npass in on $int_name proto tcp from $int_name:peer to $int_name port www<br \/>\nblock in on $int_name:broadcast<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423 pf \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432 \u043f\u0440\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b. \u0418\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a IP \u0430\u0434\u0440\u0435\u0441\u0443, \u0430 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e &#8211; \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 &#8211; \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 IP \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0435\u0442 \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10,25,13],"tags":[],"class_list":["post-1567","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-others","category-openbsd","category-security"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/1567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1567"}],"version-history":[{"count":14,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/1567\/revisions"}],"predecessor-version":[{"id":4885,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/1567\/revisions\/4885"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}