{"id":297,"date":"2015-03-24T04:45:23","date_gmt":"2015-03-24T00:15:23","guid":{"rendered":"http:\/\/www.chpert.net\/?p=297"},"modified":"2019-05-29T23:39:56","modified_gmt":"2019-05-29T19:09:56","slug":"%d9%86%d8%b5%d8%a8-%d9%88-%d8%b1%d8%a7%d9%87-%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-%d9%81%d8%a7%db%8c%d8%b1%d9%88%d9%84-pf-%d8%af%d8%b1-freebsd%d8%a7%db%8c%d9%86-%d9%82%d8%b3%d9%85%d8%aa-packet-filte","status":"publish","type":"post","link":"https:\/\/pahlevanzadeh.net\/?p=297","title":{"rendered":"\u0646\u0635\u0628 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0641\u0627\u06cc\u0631\u0648\u0644 PF \u062f\u0631 FreeBSD[\u0627\u06cc\u0646 \u0642\u0633\u0645\u062a: packet filtering] (\u0634\u0645\u0627\u0631\u0647 \u062f\u0648\u0645)"},"content":{"rendered":"<p><a href=\"http:\/\/www.pahlevanzadeh.net\/wp-content\/uploads\/2015\/03\/pf-icon.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-232 alignleft\" src=\"http:\/\/www.pahlevanzadeh.net\/wp-content\/uploads\/2015\/03\/pf-icon.png\" alt=\"pf-icon\" width=\"60\" height=\"60\" \/><\/a>\u062f\u0631 \u0634\u0645\u0627\u0631\u0647 \u0642\u0628\u0644 \u06cc\u06a9 FreeBSD-Box \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 PF \u06a9\u0647 \u0645\u062e\u0641\u0641 Packet Filter \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0622\u0645\u0627\u062f\u0647 \u06a9\u0631\u062f\u06cc\u0645. \u0627\u06cc\u0646 \u0634\u0645\u0627\u0631\u0647 \u06a9\u0644\u0627\u064b \u0628\u0647 \u0627\u06cc\u0646 Firewall \u0645\u06cc\u200c\u067e\u0631\u062f\u0627\u0632\u06cc\u0645. \u0627\u06af\u0631 \u0627\u0632 iptables \u0628\u0647 \u0627\u06cc\u0646 \u0633\u0645\u062a \u0627\u0648\u0645\u062f\u06cc\u062f \u06cc\u0627 \u0647\u0631 \u06af\u0648\u0646\u0647 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u062f\u06cc\u06af\u0631\u06cc\u060c \u062f\u0646\u0628\u0627\u0644 \u0627\u06cc\u0646 \u0646\u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0622\u0646\u0686\u0647 \u0631\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0645\u0628\u062f\u0623 \u0622\u0645\u0648\u062e\u062a\u06cc\u062f \u0627\u06cc\u0646\u062c\u0627 \u0628\u062f\u0646\u0628\u0627\u0644\u0634 \u0628\u0627\u0634\u06cc\u062f\u060c \u0628\u0644\u06a9\u0647 \u062f\u0646\u0628\u0627\u0644 \u0622\u0646 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u062e\u0648\u062f PF \u0631\u0627 \u0647\u0631 \u0628\u0647\u062a\u0631 \u06cc\u0627\u062f \u0628\u06af\u06cc\u0631\u06cc\u062f. \u0642\u0631\u0627\u0631 \u0647\u0645 \u0646\u06cc\u0633\u062a PF \u0631\u0627 \u062c\u0644\u0648\u06cc iptables \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u0645 \u0648 benchmark \u06a9\u0646\u06cc\u0645. \u0632\u06cc\u0631\u0627 \u0647\u0631 \u0634\u062e\u0635\u06cc \u06a9\u0647 \u0633\u0631\u0648\u0631\u06cc \u062e\u0627\u0635 \u0646\u0635\u0628 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c\u200c \u0628\u0627\u06cc\u062f \u0627\u0632 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0622\u0646 \u0645\u0627\u0634\u06cc\u0646 \u0628\u0647\u0631\u0647 \u062c\u0648\u06cc\u062f. \u067e\u0633 \u0627\u06af\u0631 \u0628\u0631 \u0631\u0648\u06cc \u06cc\u06a9 \u0645\u0627\u0634\u06cc\u0646 \u06af\u0646\u0648\/\u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc \u0627\u0633\u062a\u060c<br \/>\n\u0628\u0627\u06cc\u062f \u0627\u0632 iptables \u0648 \u0627\u06af\u0631 \u0628\u0631 \u0631\u0648\u06cc \u06cc\u06a9 BSD \u0628\u0627\u06a9\u0633 \u0646\u0635\u0628 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0628\u0627\u06cc\u062f \u0627\u0632 \u06cc\u06a9\u06cc \u0627\u0632 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644\u200c\u0647\u0627\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0622\u0646 \u0628\u0647\u0631\u0647 \u06af\u06cc\u0631\u062f.<br \/>\n<!--more--><\/p>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062f\u0644\u06cc\u0644 \u0627\u0646\u062a\u062e\u0627\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u062f\u0645 \u0627\u0632 PF \u0628\u0647 \u062c\u0627\u06cc \u0633\u0627\u06cc\u0631 \u0641\u0627\u06cc\u0631\u200c\u0648\u0627\u0644\u200c\u0647\u0627\u06cc BSD \u0642\u062f\u0631\u062a \u0628\u0627\u0644\u0627\u06cc\u200c \u0622\u0646 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0647\u06cc\u0686\u200c\u0648\u0642\u062a \u0641\u0627\u06cc\u0631\u0648\u0627\u0644\u200c\u0647\u0627\u06cc appliance-base \u0631\u0627 \u0628\u0627 \u0641\u0627\u06cc\u0631\u200c\u0648\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u062f\u0633\u062a \u06a9\u0627\u0631\u0628\u0631 \u0627\u0633\u062a \u0645\u0642\u0627\u06cc\u0633\u0647 \u0646\u06a9\u0646\u06cc\u062f\u060c \u0642\u06cc\u0627\u0633 \u0645\u0639\u200c\u0627\u0644\u0641\u0627\u0631\u0642 \u0627\u0633\u062a.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0627\u06af\u0631 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u0628\u0627 pfSense \u06a9\u0627\u0631 \u06a9\u0646\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u06a9\u0627\u0645\u0644 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 PF \u06a9\u0627\u0631 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0647\u0627\u062c\u0631\u062a \u06a9\u0646\u06cc\u062f. \u0632\u06cc\u0631\u0627 core \u0622\u0646 \u0627\u0632 PF \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0628\u0639\u062f\u0627 \u0645\u0634\u062e\u0635 \u062e\u0648\u0627\u0647\u062f \u0634\u062f \u06a9\u0647 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0647\u0645\u06cc\u0634\u0647 \u062c\u0644\u0648\u062a\u0631\u0646\u062f.<\/p>\n<p style=\"font-size: 18px;\"><strong>\u06f1. \u0641\u0631\u0645\u0627\u0646 pfctl<\/strong><\/p>\n<p>\u0628\u06af\u0630\u0627\u0631\u06cc\u062f \u06a9\u0645\u06cc \u0628\u0627 \u0627\u06cc\u0646 \u0641\u0631\u0645\u0627\u0646 \u0622\u0647\u0633\u062a\u0647 \u0622\u0647\u0633\u062a\u0647 \u062c\u0644\u0648 \u0631\u0648\u06cc\u0645\u060c \u0627\u0648\u0644\u06cc\u0646 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u0627 \u0627\u06cc\u0646 \u0641\u0631\u0645\u0627\u0646 \u06cc\u0627\u062f \u0628\u06af\u06cc\u0631\u06cc\u0645 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f configuration \u0641\u0627\u06cc\u0644 PF \u0631\u0627 \u0644\u0648\u062f \u06a9\u0646\u062f \u0648 \u06cc\u0627 \u0628\u062f\u0648\u0646 \u0644\u0648\u062f\u060c \u0622\u0646 \u0631\u0627 parse \u0646\u0645\u0627\u06cc\u062f \u06a9\u0647 \u0628\u062f\u0631\u062f Debug mode \u0645\u06cc\u200c\u062e\u0648\u0631\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">root@firewall:\/home\/mohsen # pfctl -f .\/pf.conf  ##load pf.conf\r\nroot@firewall:\/home\/mohsen # pfctl -vnf .\/pf.conf  ###-v verbose mode, -n causes dont'a load conf file\r\nSYN_ONLY = \"S\/FSRA\"\r\next_if = \"em1\"\r\nff_if = \"em0\"\r\nlocalnet = \"$ff_if:192.168.1.0\/24\"\r\npass in all flags S\/SA keep state<\/pre>\n<p>\u062d\u0627\u0644 \u0646\u06cc\u0627\u0632 \u0645\u0646\u062f unload \u06a9\u0631\u062f\u0646 conf \u0641\u0627\u06cc\u0644 \u0647\u0633\u062a\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">root@firewall:\/home\/mohsen # pfctl -F all -f .\/pf.conf  ###unload pf.conf\r\nrules cleared\r\nnat cleared\r\n0 tables deleted.\r\naltq cleared\r\n1 states cleared\r\nsource tracking entries cleared\r\npf: statistics cleared\r\npf: interface flags reset<\/pre>\n<p>\u0628\u06cc\u0627\u06cc\u062f \u06a9\u0645\u06cc \u0627\u0635\u0648\u0644\u06cc \u0648 \u0628\u0627 \u0632\u0628\u0627\u0646 pf \u0628\u0627 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u0633\u062e\u0646 \u0628\u06af\u0648\u06cc\u06cc\u0645. \u0632\u0628\u0627\u0646 \u0628\u0627\u0644\u0627 \u0647\u0631\u0686\u0646\u062f \u0646\u06cc\u0627\u0632 \u0627\u0633\u062a \u0648\u0644\u06cc \u06a9\u062b\u06cc\u0641 \u0627\u0633\u062a. \u062f\u0631 rc.conf \u06cc\u06a9 \u0645\u062a\u063a\u06cc\u0631 \u0628\u0631\u0627\u06cc pf \u0628\u0647 \u0646\u0627\u0645 pf_rules \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u060c\u200c\u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0633\u06cc\u0631 conf \u0641\u0627\u06cc\u0644 \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u0622\u0646 \u0628\u062f\u0647\u06cc\u062f \u06a9\u0647 \u0635\u0648\u0644\u0627 \u0622\u0646 \u0631\u0627 \u062f\u0631 \/etc\/ \u0645\u06cc\u200c\u06af\u0630\u0627\u0631\u0646\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">pf_rules=\"\/etc\/pf.conf\"<\/pre>\n<p>\u0648\u0642\u062a\u06cc \u0628\u0627 rc.conf \u0641\u0627\u06cc\u0644 conf \u0645\u0627\u0646 \u0644\u0648\u062f \u0634\u062f \u062f\u06cc\u06af\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 \u062f\u0648 \u06af\u0632\u06cc\u0646\u0647 d- \u0648 e- \u0622\u0646 \u0631\u0627 disbale \u0648 enable \u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">pfctl -d ##disbale pf\r\npcftl -e ##enable pf<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062f\u0631 \u0645\u0648\u0631\u062f \u06af\u0632\u06cc\u0646\u0647\u200c\u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 pcftl \u0645\u062c\u0648\u0631\u06cc\u0645 \u062c\u0644\u0648\u062a\u0631 \u062a\u0648\u0636\u06cc\u062d \u062f\u0647\u06cc\u0645 \u0632\u06cc\u0631\u0627 \u0645\u062d\u0628\u0648\u0631\u06cc\u0645 \u06cc\u06a9 pf.conf \u0647\u0631 \u0686\u0646\u062f \u0648\u0644\u0648 \u06a9\u0645 \u0648\u0644\u06cc \u0622\u0645\u0648\u0632\u0634\u06cc \u0628\u0646\u0648\u06cc\u0633\u06cc\u0645 \u0648 \u062f\u0631 \u0645\u0648\u0631\u062f \u0622\u0646 \u0648 \u0633\u0627\u062e\u062a\u0627\u0631\u0634 \u0628\u062d\u062b \u06a9\u0646\u06cc\u0645 \u0648 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0631\u06af\u0631\u062f\u06cc\u0645 \u0628\u0647 \u062f\u0633\u062a\u0648\u0631 pfctl \u06a9\u0647 \u0645\u0642\u062f\u0627\u0631\u06cc \u0628\u06cc\u0634\u062a\u0631 \u062c\u0627\u06cc \u0628\u0631\u0631\u0633\u06cc \u062f\u0627\u0631\u062f. <strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0627\u06af\u0631 iptables \u062f\u0631 \u0633\u0637\u062d \u06a9\u0644\u0627\u0646 \u06a9\u0627\u0631 \u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u06cc\u062f rule \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u06cc\u06a9 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0645\u06cc\u200c\u06a9\u0631\u062f\u06cc\u062f \u0648 \u0647\u0645\u0647 \u0686\u06cc \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u06cc\u06a9 argument \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u200c\u06a9\u0631\u062f\u06cc\u062f \u0648 \u0686\u0646\u062f\u06cc\u0646 \u0645\u0632\u06cc\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u062f\u0627\u0634\u062a:<\/p>\n<ul style=\"margin-right: 20px;\">\n<li style=\"margin-right: 20px;\">\n<p>\u0628\u0647 \u0647\u0631 \u0686\u06cc\u0632\u06cc \u0628\u0647 \u0635\u0648\u0631\u062a \u06cc\u06a9 \u0645\u062a\u063a\u06cc\u0631 \u062f\u06cc\u062f\u0647 \u0645\u06cc\u0634\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 20px;\">\n<p>\u0628\u0631\u0627\u06cc debug \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u0645\u06cc\u0634\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 20px;\">\n<p>\u062d\u062c\u0645 rule \u0647\u0627 \u067e\u0627\u06cc\u06cc\u0646 \u0645\u06cc\u0627\u0645\u062f.(\u062f\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u060c \u0646\u0647 \u062f\u0631 \u062e\u0648\u062f iptables)<\/p>\n<\/li>\n<\/ul>\n<p>\u0627\u0645\u0627 \u0632\u06cc\u0628\u0627\u06cc\u06cc conf \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc pf \u062f\u0631 \u0647\u0645\u06cc\u0646 \u0633\u0627\u062e\u062a\u0627\u0631\u0634\u0627\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0686\u0646\u06cc\u0646 \u0639\u0628\u0627\u0631\u0627\u062a\u06cc \u0631\u0627 \u062f\u0631 \u062e\u0648\u0631\u062f \u062f\u0627\u0631\u0646\u062f.<\/p>\n<p style=\"font-size: 17px;\"><strong>\u06f1.\u06f1 \u06cc\u06a9 pf.conf <\/strong><\/p>\n<p>\u06cc\u06a9 pf \u0641\u0627\u06cc\u0644 \u0628\u0647 \u06f4 \u0642\u0633\u0645\u062a \u0632\u06cc\u0631 \u062a\u0642\u0633\u06cc\u0645 \u0645\u06cc\u0634\u0648\u062f:<\/p>\n<p><strong>\u06f1.\u06f1.\u06f1 Macro \u0647\u0627:<\/strong> \u0645\u062a\u063a\u06cc\u0631\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062a\u0648\u0633\u0637 \u06a9\u0627\u0631\u0628\u0631 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u200c\u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f IP address \u0647\u0627\u060c Interface \u0647\u0627 \u0648 \u063a\u06cc\u0631\u0647 \u0631\u0627 \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u06a9\u0646\u0646\u062f. List \u0647\u0627 \u0646\u06cc\u0632 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0646\u0648\u0639 \u062f\u0627\u062f\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0647\u0633\u062a\u0646\u062f.<\/p>\n<p><strong>\u06f1.\u06f1.\u06f2 Table\u0647\u0627 :<\/strong> \u0633\u0627\u062e\u062a\u0627\u0631\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u0644\u06cc\u0633\u062a IP address \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p><strong>\u06f1.\u06f1.\u06f3 Option \u0647\u0627:<\/strong> \u06af\u0632\u06cc\u0646\u0647\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0631\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644 \u0627\u06cc\u0646\u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 pf \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<p><strong>\u06f1.\u06f1.\u06f4 Filter Rule \u0647\u0627<\/strong>: \u062a\u0645\u0627\u0645 rule \u0647\u0627\u06cc packet filtering \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0646\u0648\u0634\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u062f\u0631 \u062c\u0644\u0648\u062a\u0631 \u0628\u0627 \u0622\u0646 \u0622\u0634\u0646\u0627 \u0645\u06cc\u200c\u0634\u0648\u06cc\u0645.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062f\u0648 \u0645\u0641\u0647\u0645\u0648\u0645 \u062f\u06cc\u06af\u0631 \u062f\u0631 conf \u0641\u0627\u06cc\u0644\u200c\u0647\u0627 \u0630\u06a9\u0631 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u06a9\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0627\u0633\u0627\u0633\u06cc\u200c\u062a\u0631\u06cc\u0646 \u0646\u0642\u0627\u0637 \u0642\u0648\u062a pf \u0645\u06cc\u200c\u0628\u0627\u0634\u0646\u062f. \u06a9\u0647 \u0634\u0627\u0645\u0644 \u062f\u0648 \u0645\u0641\u0647\u0648\u0645 Traffic Normalization \u0648 Queueing \u0645\u06cc\u200c\u0628\u0627\u0634\u0646\u062f \u0648 \u062f\u0631 \u0634\u0645\u0627\u0631\u0647\u200c\u0647\u0627\u06cc \u0628\u0639\u062f\u06cc \u0645\u0637\u0644\u0628 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc \u062e\u0648\u0627\u0647\u06cc\u0645 \u0646\u0648\u0634\u062a.<br \/>\n<strong>List \u0647\u0627:<\/strong> \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062f\u0642\u06cc\u0642\u0627\u064b \u06a9\u0627\u0631\u06a9\u0631\u062f \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0631\u0627 \u0628\u06cc\u0627\u0646 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block out on em0 from { 192.168.5.1, 192.168.1.10 } to any<\/pre>\n<p>\u0645\u062b\u0627\u0644 \u0628\u0627\u0644\u0627 \u06cc\u06a9 rule \u0627\u0633\u062a \u06a9\u0647 \u0645\u0627 \u0628\u0627 \u0628\u0642\u06cc\u0647 rule \u06a9\u0627\u0631\u06cc \u0646\u062f\u0627\u0631\u06cc\u0645. \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc\u0645\u0627\u0646 \u0645\u0647\u0645 \u0627\u0633\u062a \u062f\u0627\u062e\u0644 {} \u0627\u0633\u062a IP address \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062f\u0627\u062e\u0644 \u06cc\u06a9 rule \u062f\u0631 {}\u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u06cc\u06a9 List \u0646\u0627\u0645\u06cc\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u0627\u06cc\u0646 \u0642\u062f\u0631\u062a \u0641\u0648\u0642 \u0627\u0644\u0639\u0627\u062f\u0647\u200c\u0627\u06cc \u0628\u0647 \u06cc\u06a9 sysadmin \u0645\u06cc\u200c\u062f\u0647\u062f. \u0628\u06af\u0630\u0627\u0631\u06cc\u062f \u06a9\u0645\u06cc \u0647\u0645 \u062f\u0631 \u0645\u0648\u0631\u062f rule \u0628\u0627\u0644\u0627 \u0635\u062d\u0628\u062a \u06a9\u0646\u06cc\u0645\u060c rule \u0628\u0627\u0644\u0627 \u0628\u0647 \u0641\u0627\u0631\u0633\u06cc \u0645\u06cc\u200c\u06af\u0648\u06cc\u062f \u062a\u0645\u0627\u0645 \u0628\u0633\u062a\u0647\u200c\u0647\u0627\u06cc\u06cc \u0631\u0627 \u06a9\u0647 \u0628\u0631 \u0631\u0648\u06cc \u0627\u06cc\u0646\u062a\u0631\u0641\u06cc\u0633 em0 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u062e\u0627\u0631\u062c \u0634\u0648\u0646\u062f \u0648 IP \u0645\u0628\u062f\u0623 \u0622\u0646\u200c\u0647\u0627 \u0627\u0632 \u062f\u0648 IP \u062f\u0631\u0648\u0646 \u0644\u06cc\u0633\u062a \u0645\u0627 \u0628\u0647 \u0647\u0631 \u062c\u0627 \u06cc\u0639\u0646\u06cc \u0628\u0647 \u0647\u0631 dest IP \u0628\u0627\u0634\u062f block \u06a9\u0646. \u06cc\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062a\u063a\u06cc\u0631 \u0647\u0645 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0622\u0646\u200c\u0647\u0627 \u0628\u0647\u0631\u0647 \u062c\u0633\u062a:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">whitelist = \"{ 192.168.1.2 192.168.1.3 }\"\r\npass in inet proto tcp from { 10.10.0.0\/24 $whitelist } to port 22<\/pre>\n<p>\u062f\u0631 \u062c\u0644\u0648\u062a\u0631 \u0628\u0647 \u062a\u0641\u0635\u06cc\u0644 \u062f\u0631 \u0645\u0648\u0631\u062f rule \u0647\u0627 \u062e\u0648\u0627\u0647\u06cc\u0645 \u067e\u0631\u062f\u0627\u062e\u062a \u0646\u06af\u0631\u0627\u0646 \u0646\u0628\u0627\u0634\u06cc\u062f.<\/p>\n<p><strong>\u06f1.\u06f1.\u06f1 Macro \u0647\u0627: <\/strong> \u062d\u062f\u0627\u0642\u0644 \u0628\u0631\u0627\u06cc \u0647\u0631 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0628\u0647 \u062f\u0648 \u06a9\u0627\u0631\u062a \u0634\u0628\u06a9\u0647 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f\u06cc\u0645. \u0628\u0631\u0627\u06cc \u0633\u0646\u0627\u0631\u06cc\u0648\u200c\u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647\u200c\u062a\u0631 \u0628\u0647 \u0628\u06cc\u0634 \u0627\u0632 \u06f2 \u06a9\u0627\u0631\u062a \u0634\u0628\u06a9\u0647 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f\u06cc\u0645. \u0627\u0645\u0627 \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u0628\u0647 em0 \u0648 em1 \u0628\u0633\u0646\u062f\u0647 \u06a9\u0631\u062f\u06cc\u0645. \u0628\u0647 \u062f\u0648 \u0645\u0627\u06a9\u0631\u0648\u06cc \u0632\u06cc\u0631 \u062f\u0642\u062a \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">ext_if=\"em0\"\r\nint_if=\"em1\"<\/pre>\n<p>\u0633\u067e\u0633 \u0628\u0627 \u062f\u0648 \u0645\u062a\u063a\u06cc\u0631 ext_if$ \u0648 int_if$ \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u0645 \u062f\u0631 \u06a9\u0644 rule \u0647\u0627\u06cc\u0645\u0627\u0646 \u0628\u0647 \u0627\u06cc\u0646 \u062f\u0648 interface \u0627\u0634\u0627\u0631\u0647 \u0646\u0645\u0627\u06cc\u06cc\u0645\u060c\u200c\u0647\u0645\u0627\u0646\u0646\u062f rule \u0632\u06cc\u0631:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block out on $ext_if from any to any<\/pre>\n<p><strong>\u06f1.\u06f1.\u06f2 Table \u0647\u0627:<\/strong> \u06cc\u06a9 table \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0645\u062c\u0645\u0648\u0639\u0647\u200c\u0627\u06cc\u0633\u062a \u0627\u0632 IP address \u0647\u0627 \u06a9\u0647 \u0628\u0647 \u0647\u0645\u06cc\u0646 \u0646\u0627\u0645 (table) \u06cc\u06a9 \u062f\u0627\u06cc\u0631\u06a9\u062a\u06cc\u0648 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f. Table \u0647\u0627 \u0628\u0631 \u062f\u0648\u0646\u0648\u0639\u0646\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>const : \u0645\u062d\u062a\u0648\u06cc\u0627\u062a \u0627\u06cc\u0646 \u0646\u0648\u0639 table \u0647\u0627 \u062f\u0631 \u0637\u0648\u0644 \u0632\u0645\u0627\u0646\u06cc pf \u0628\u0627\u0644\u0627 \u0627\u0633\u062a \u062a\u063a\u06cc\u06cc\u0631 \u0646\u0627\u067e\u0630\u06cc\u0631\u0646\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>persist : \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f \u062a\u0627 \u06a9\u0631\u0646\u0644 \u0645\u062d\u062a\u0648\u06cc\u0627\u062a \u062c\u062f\u0648\u0644 \u0631\u0627 \u062f\u0631\u0648\u0646 \u062d\u0627\u0641\u0638\u0647 \u0646\u06af\u0647\u062f\u0627\u0631\u062f.<\/p>\n<\/li>\n<\/ul>\n<p>Table \u0647\u0627 \u06cc\u06a9\u06cc \u0627\u0632 \u0646\u0642\u0637\u0647\u200c\u0647\u0627\u06cc \u0642\u0648\u062a pf \u0645\u062d\u0633\u0648\u0628 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u062f\u0631 \u0647\u0631 \u0644\u062d\u0638\u0647 lookup \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u06f5\u06f0,\u06f0\u06f0\u06f0 \u0622\u062f\u0631\u0633 \u0631\u0627 lookup \u06a9\u0631\u062f. \u0628\u0647 \u062f\u0648 \u06af\u0648\u0646\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062a\u0639\u06cc\u0631\u06cc\u0641 \u06a9\u0631\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">table  { 192.168.10.0\/24, !192.168.10.5 }<\/pre>\n<p>\u0639\u0645\u0644\u06af\u0631 ! \u062f\u0631 \u0647\u0645\u0647 \u062c\u0627\u06cc pf \u0628\u0647 \u0645\u0639\u0646\u06cc NOT \u0639\u0645\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u062f\u0631 \u0628\u0627\u0644\u0627 \u062c\u062f\u0648\u0644 internetaccess \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0634\u0628\u06a9\u0647\u200c\u0627\u06cc \u0628\u0627 \u0646\u0627\u0645 192.168.10.0\/24 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0648\u0644\u06cc \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u0622\u062f\u0631\u0633 192.168.10.5 \u0627\u0632 \u0627\u06cc\u0646 \u0634\u0628\u06a9\u0647 \u0631\u0627 \u06cc\u06a9 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u0645. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0628\u0627 \u062f\u0627\u06cc\u0631\u06a9\u062a\u06cc\u0648 table \u062c\u062f\u0648\u0644\u06cc \u0628\u0647 \u0646\u0627\u0645 internetaccess \u062f\u0631\u0633\u062a \u06a9\u0631\u062f\u06cc\u0645. \u062a\u0639\u0631\u06cc\u0641 \u0628\u0627\u0644\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0647 \u062f\u0648 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0628\u0627\u0634\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">table  const { 192.168.10.0\/24, !192.168.10.5 }\r\ntable  persist { 192.168.10.0\/24, !192.168.10.5 }<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0648\u0642\u062a\u06cc \u062c\u062f\u0648\u0644\u06cc \u0631\u0627 \u0646\u0648\u0639\u0634 \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c\u200cpf \u0622\u0646 \u0631\u0627 const \u062f\u0631 \u0646\u0638\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0627\u06a9\u062b\u0631 \u062c\u062f\u0627\u0648\u0644 persist \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u06cc\u06a9 \u062a\u0639\u0631\u06cc\u0641 \u0628\u0633\u06cc\u0627\u0631 \u0632\u06cc\u0628\u0627 \u0627\u0632 \u062c\u062f\u0627\u0648\u0644 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u0645\u0642\u0627\u062f\u06cc\u0631 \u062e\u0648\u062f \u0631\u0627 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627 \u0645\u06cc\u200c\u062e\u0648\u0627\u0646\u0646\u062f. \u0627\u06cc\u0646 \u0628\u0631\u0627\u06cc \u0645\u0642\u0627\u062f\u06cc\u0631 \u0628\u0627 \u062a\u0639\u062f\u0627\u062f \u0632\u06cc\u0627\u062f \u06a9\u0627\u0631\u06cc \u0639\u0642\u0644\u0627\u0646\u06cc \u0648 \u0628\u0647 \u0646\u0648\u0639\u06cc \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">table  persist file \"\/etc\/pf\/whitelist.pf\"<\/pre>\n<p>\u0628\u0639\u062f \u0627\u0632 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u062e\u0637 \u0628\u0627\u0644\u0627 \u0628\u0647 conf \u0641\u0627\u06cc\u0644 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0622\u0646 \u067e\u0631\u06cc\u0646\u062a \u06af\u0631\u0641\u062a:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">root@firewall:\/home\/mohsen # pfctl -t whitelist -T show\r\n   172.16.0.1\r\n   172.16.3.5\r\n   192.168.1.5<\/pre>\n<p>\u062e\u0637\u0648\u0637 etc\/pf\/whitelist.pf\/ \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">root@firewall:\/home\/mohsen # cat \/etc\/pf\/whitelist.pf \r\n172.16.0.1\r\n172.16.3.5\r\n192.168.1.5<\/pre>\n<p>\u0634\u0645\u0627 \u0628\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 t- \u06a9\u0648\u0686\u06a9 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0646\u0627\u0645 \u062c\u062f\u0648\u0644 \u0631\u0627 \u0645\u0634\u062e\u0635 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0627 T- \u0628\u0632\u0631\u06af \u0686\u0647\u0627\u0631 \u0639\u0645\u0644 show\u060c replace \u060cdelete \u0648 add \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0622\u0646 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">root@firewall:\/home\/mohsen # pfctl -t whitelist -T add 10.10.10.0\/8\r\n1\/1 addresses added.\r\nroot@firewall:\/home\/mohsen # pfctl -t whitelist -T add \\!10.10.10.5\r\n1\/1 addresses added.\r\nroot@firewall:\/home\/mohsen # pfctl -t whitelist -T show\r\n   10.0.0.0\/8\r\n  !10.10.10.5\r\n   172.16.0.1\r\n   172.16.3.5\r\n   192.168.1.5<\/pre>\n<p><strong>\u06f1.\u06f1.\u06f3 Option \u0647\u0627: <\/strong> option \u0647\u0627 \u0628\u0631\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644 \u0646\u062d\u0648\u0647 \u0639\u0645\u0644 pf \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u0634\u0648\u0646\u062f. \u0647\u0645\u0647 \u0622\u0646\u200c\u0647\u0627 \u0628\u0627 \u062f\u0627\u06cc\u0631\u06a9\u062a\u06cc\u0648 set \u0634\u0631\u0648\u0639 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u0628\u0639\u062f \u0627\u0633\u0645 option \u0648 \u0628\u0639\u062f \u0645\u0642\u062f\u0627\u0631\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f set \u0634\u0648\u062f. \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">set fingerprints \"\/etc\/pf.os\"<\/pre>\n<p><strong>\u06f1.\u06f1.\u06f4 Filter Rule \u0647\u0627:<\/strong> \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u062e\u0648\u062f \u06cc\u06a9\u06cc \u0627\u0632 \u0628\u062e\u0634\u200c\u0647\u0627\u06cc \u0645\u0647\u0645 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0627\u06cc\u0646\u06a9\u0647 \u0637\u0648\u0644 \u0648 \u062a\u0641\u0635\u06cc\u0644\u06cc \u062f\u0627\u0631\u062f. \u067e\u0633 \u0686\u0647 \u0628\u0647\u062a\u0631 \u06a9\u0647 \u0627\u0632 \u0622\u0646 \u06af\u0630\u0631 \u06a9\u0646\u06cc\u0645\u060c \u0686\u0648\u0646 \u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u06a9\u0627\u0646\u0641\u06cc\u06af \u0641\u0627\u06cc\u0644 \u0647\u0633\u062a\u06cc\u0645 \u0648 \u0628\u062e\u0634\u200c\u0647\u0627\u06cc \u0622\u0646 \u0631\u0627 \u062a\u0648\u0636\u06cc\u062d \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645. \u06cc\u06a9 pf.conf \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0633\u0627\u062e\u062a\u0627\u0631\u06cc \u0628\u0647 \u0642\u0637\u0639\u0627\u062a \u0632\u06cc\u0631 \u062a\u0642\u0633\u06cc\u0645 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">## Macros \r\n## TABLES \r\n## GLOBAL OPTIONS \r\n## TRAFFIC NORMALIZATION \r\n## QUEUEING RULES\r\n## TRANSLATION RULES (NAT)\r\n## FILTER RULES<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0639\u0644\u0627\u0645\u062a # \u0647\u0645\u0627\u0646\u0646\u062f \u0634\u0644 comment \u0645\u06cc\u200c\u06a9\u0646\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062f\u0631 \u0641\u0627\u06cc\u0644 \u0628\u0627\u0644\u0627 \u0641\u0642\u0637 \u0633\u0627\u062e\u062a\u0627\u0631 \u06cc\u06a9 pf.conf \u0627\u0632 \u0628\u0627\u0644\u0627 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u067e\u0631\u06cc\u0646\u062a \u0634\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062f\u0631 \u0628\u0627\u0644\u0627 \u06f3 \u0646\u0648\u0639 rule \u0645\u06cc\u200c\u0628\u06cc\u0646\u06cc\u062f \u06a9\u0647 \u062e\u0648\u062f \u0645\u0633\u062a\u062f\u0627\u062a pf \u063a\u06cc\u0631 \u0627\u0632 Queueing \u0647\u0645\u0647 \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u06cc\u06a9\u06cc \u062f\u0627\u0646\u0633\u062a\u0647 \u0627\u0633\u062a.<\/p>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0641\u06a9\u0631 \u0646\u06a9\u0646\u06cc\u062f \u0645\u0637\u0627\u0644\u0628 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 pf \u062f\u0631 \u0633\u0627\u06cc\u062a \u0645\u0646 \u062a\u0645\u0627\u0645 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u0628\u0644\u06a9\u0647 \u0627\u062f\u0627\u0645\u0647\u200c\u062f\u0627\u0631 \u0627\u0633\u062a.<\/p>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062e\u0648\u062f \u0645\u0628\u062d\u062b QUEUEING \u06a9\u0647 \u0634\u0627\u0645\u0644 \u06a9\u0644\u06cc \u0641\u0631\u0627\u0645\u06cc\u0646 \u0645\u06cc\u200c\u0634\u0648\u062f \u0645\u0637\u0645\u0626\u0646\u0627\u064b \u06cc\u06a9 \u0645\u0637\u0644\u0628 \u062f\u0631 \u0647\u0645\u06cc\u0646 \u0633\u0627\u06cc\u062a \u0645\u06cc\u200c\u0634\u0648\u062f.<br \/>\n\u0628\u06cc\u0627\u06cc\u06cc\u062f \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0627\u0632 \u06cc\u06a9 pf.conf \u0628\u0632\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">## Macros \r\next_if=\"em0\"\r\n## TABLES \r\ntable  persist  { 192.168.10.0\/24, !192.168.10.5 }\r\ntable  persist file \"\/etc\/pf\/whitelist.pf\"\r\n## GLOBAL OPTIONS \r\n## TRAFFIC NORMALIZATION \r\n## QUEUEING RULES\r\n## TRANSLATION RULES (NAT)\r\n## FILTER RULES\r\npass in all<\/pre>\n<p>\u062d\u0627\u0644 \u06a9\u0647 \u0641\u0627\u06cc\u0644 pf.conf \u062a\u0645\u0627\u0645 \u0634\u062f\u060c \u0628\u0631\u06af\u0631\u062f\u06cc\u0645 \u0628\u0647 \u0647\u0645\u0627\u0646 \u062f\u0633\u062a\u0648\u0631 pfctl \u0648 \u0686\u0646\u062f \u062f\u0633\u062a\u0648\u0631 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u0631\u0648\u0646\u0645\u0627\u06cc\u06cc \u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">pfctl -s  nat   #Show the stat of nat \r\npfctl -sr   \t#Show the current rulese\r\npfctl -ss   \t#Show the current state table\r\npfctl -si    \t#Show filter stats and counters\r\npfctl -sa   \t#Show EVERYTHING it can show<\/pre>\n<p>\u0646\u06a9\u062a\u0647: s- \u06cc\u06a9 \u06af\u0632\u06cc\u0646\u0647 \u062a\u0631\u06a9\u06cc\u0628\u06cc \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0648 \u0627\u06af\u0631 \u0628\u0627 r \u062a\u0631\u06a9\u06cc\u0628 \u0634\u0648\u062f rule \u0647\u0627 \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f. \u0627\u06af\u0631 \u0628\u0627 s \u062a\u0631\u06a9\u06cc\u0628 \u0634\u0648\u062f State \u0647\u0627\u06cc handshakeing \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f. \u0648 \u0627\u06af\u0631 \u0628\u0627 i \u062a\u0631\u06a9\u06cc\u0628 \u0634\u0648\u062f \u0634\u0645\u0627\u0631\u0646\u062f\u0647\u200c\u0647\u0627 \u0648 \u0648 \u0648\u0636\u0639\u06cc\u062a filter \u0647\u0627 \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f. \u0648 \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u0627\u06af\u0631 \u0628\u0627 a \u062a\u0631\u06a9\u06cc\u0628 \u0634\u0648\u062f \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f, \u0648 \u06af\u0641\u062a\u0647 \u0646\u0634\u062f \u06a9\u0647 \u0627\u06af\u0631 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 nat \u0631\u0627 \u0628\u0647 \u0622\u0646 \u0628\u062f\u0647\u06cc\u0645 \u062c\u0632\u06cc\u06cc\u0627\u062a NAT \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u0628\u0645\u0627\u0646\u062f \u0628\u0631\u0627\u06cc \u0634\u0645\u0627\u0631\u0647\u200c\u0647\u0627\u06cc \u0622\u062a\u06cc&#8230;<\/p>\n<p style=\"font-size: 18px;\"><strong>\u06f2. \u0646\u0648\u0634\u062a\u0646 Filter Rule \u0647\u0627:<\/strong><\/p>\n<p>\u0628\u0647 \u06cc\u0627\u062f \u062f\u0627\u0631\u0645 \u0645\u062a\u063a\u06cc\u0631\u200c\u0647\u0627\u06cc \u0631\u0632\u0631\u0648 \u0634\u062f\u0647 awk \u0631\u0648 \u0641\u0631\u0645\u0648\u0644\u06cc \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u0645 \u0648 \u062d\u0641\u0638 \u0646\u06a9\u0631\u062f\u0645. \u0645\u062b\u0644\u0627\u064b N == Number \u06cc\u0627 F == Field \u06cc\u0627R == Row \u06cc\u0627 O == Output \u06cc\u0627 S == Separator \u0648 \u063a\u06cc\u0631\u0647 \u2026 \u0648 \u0648\u0642\u062a\u06cc \u06cc\u0647 \u062a\u0631\u06a9\u06cc\u0628 \u0635\u0648\u0631\u062a \u0628\u06af\u06cc\u0631\u0647 \u0645\u062b\u0644 NF \u06cc\u0639\u0646\u06cc \u062a\u0639\u062f\u0627\u062f \u0641\u06cc\u0644\u062f\u0647\u0627&#8230;! \u062d\u0627\u0644\u0627 \u062a\u0631\u062c\u06cc\u062d \u0645\u06cc\u200c\u062f\u0645 \u062e\u0648\u0627\u0646\u0646\u062f\u0647 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0646\u0648\u0634\u062a\u0646 Filter Rule \u0628\u0631\u0627\u06cc PF \u0631\u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u0641\u0631\u0645\u0648\u0644\u06cc \u06cc\u0627\u062f \u0628\u06af\u06cc\u0631\u0647 \u06a9\u0647 \u062e\u06cc\u0644\u06cc \u0628\u0647 \u0646\u0641\u0639\u0634\u0647\u060c \u0627\u0644\u0628\u062a\u0647 \u0627\u0648\u0644\u0634 \u06cc\u0647 \u06af\u0631\u06cc\u0632 \u0628\u0647 syntax \u0627\u0635\u0644\u06cc rule \u0647\u0627 \u0645\u06cc\u200c\u0632\u0646\u06cc\u0645. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 syntax \u0627\u0635\u0644\u06cc \u0647\u0631 rule \u062f\u0631 \u062d\u0627\u0644\u062a \u06a9\u0644\u06cc \u0647\u0645\u0627\u0646\u0646\u062f \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">action [direction] [log] [quick] [on interface] [af] [proto protocol] [from src_addr [port src_port]] [to dst_addr [port dst_port]] [flags tcp_flags] [state]<\/pre>\n<p>\u0646\u06a9\u062a\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062f\u0631 rule \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc pf \u0631\u0639\u0627\u06cc\u062a \u0634\u062f\u0647 \u0627\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0645\u0627\u062a \u0627\u0646\u06af\u0644\u06cc\u0633\u06cc \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0648 \u0627\u0647\u0645\u06cc\u062a \u0627\u0645\u0631 \u0645\u0648\u062c\u0628 \u062e\u0648\u0627\u0646\u0627\u06af\u06cc \u0648 \u0645\u0631\u062a\u0628 \u0628\u0648\u062f\u0646 rule \u0647\u0627 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p><strong><em>action:<\/em><\/strong> \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0628\u0631\u0627\u06cc \u0628\u0633\u062a\u0647\u200c\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a \u06a9\u0647 match \u0634\u062f\u0647\u200c\u0627\u0646\u062f. \u0648 \u0628\u0627 \u0627\u06a9\u0634\u0646 pass \u0648 block \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 \u0622\u0646 \u0641\u0631\u0645\u0627\u0646 \u062f\u0627\u062f. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0647\u0645\u0627\u0646 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u062c\u0644\u0648\u06cc j- \u0628\u0631\u0627\u06cc iptables \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u062c\u0644\u0648\u062a\u0631 \u0628\u0627 \u0645\u062b\u0627\u0644\u200c \u0628\u0631\u062e\u0648\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645.<\/p>\n<p><strong><em>direction:<\/em><\/strong> \u0634\u0645\u0627 \u0628\u0627 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u062c\u0647\u062a \u0628\u0633\u062a\u0647 \u0631\u0627 \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f in \u06cc\u0627 out \u0628\u0627\u0634\u062f.<\/p>\n<p><strong><em>log:<\/em><\/strong> \u0628\u0631\u0627\u06cc log \u06af\u06cc\u0631\u06cc \u0627\u0632 pf \u0628\u06a9\u0627\u0631 \u0645\u06cc\u200c\u0631\u0648\u062f. Logging \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u06cc\u06a9\u06cc \u0627\u0632 \u0642\u062f\u0631\u062a\u0645\u0646\u062f\u062a\u0631\u06cc\u0646 \u0642\u0633\u0645\u062a\u200c\u0647\u0627\u06cc \u0622\u0646 \u0645\u062d\u0633\u0648\u0628 \u0645\u06cc\u200c\u0634\u0648\u062f \u0628\u0647 \u0637\u0648\u0631\u06cc \u0628\u0631\u0627\u06cc \u0622\u0646 \u062c\u062f\u0627\u06af\u0627\u0646\u0647 \u0627\u0632 \u06cc\u06a9 device \u0628\u0647 \u0646\u0627\u0645 pflog0 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0645\u0637\u0627\u0644\u0628\u06cc \u0631\u0627 \u062f\u0631 \u0634\u0645\u0627\u0631\u0647\u200c\u0647\u0627\u06cc \u0622\u062a\u06cc \u0628\u0631\u0627\u06cc\u0634 \u0645\u06cc\u200c\u0646\u0648\u06cc\u0633\u0645.<\/p>\n<p><strong><em>quick:<\/em><\/strong> \u0628\u0627 \u0627\u06cc\u0646 \u0644\u063a\u062a \u062a\u0642\u062f\u0645 rule \u0647\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645. \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u062c\u0644\u0648\u062a\u0631 \u0628\u0627 \u0645\u062b\u0627\u0644 \u062a\u0648\u0636\u06cc\u062d \u062f\u0647\u0645.<\/p>\n<p><strong><em>interface: <\/em><\/strong>\u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f interface \u0645\u0631\u0628\u0648\u0637\u0647 \u0631\u0627 \u0645\u0634\u062e\u0635 \u0646\u0645\u0627\u06cc\u06cc\u062f\u060c \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 :<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">pass out on em0 inet proto tcp from any to any port = ssh<\/pre>\n<p>\u0645\u0642\u062f\u0627\u0631 on em0 \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0627\u06cc\u0646\u062a\u0631\u0641\u06cc\u0633 em0 \u0627\u06cc\u0646 \u0641\u06cc\u0644\u062a\u0631 match \u0634\u0648\u062f.<\/p>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u067e\u0633 \u06cc\u0627\u062f\u062a\u0627\u0646 \u0628\u0627\u0634\u062f \u06a9\u0647 \u0642\u0633\u0645\u062a interface \u0647\u0645\u06cc\u0634\u0647 \u06cc\u06a9 on \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u062f\u0627\u0631\u062f.<\/p>\n<p><strong><em>af:<\/em><\/strong> \u0627\u06cc\u0646 \u0644\u063a\u062a \u062e\u0648\u062f \u0628\u0647 \u06a9\u0627\u0631 \u0646\u0645\u06cc\u200c\u0631\u0648\u062f \u0648 \u0645\u062e\u0641\u0641 Adress Family \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0648 \u0628\u0647 \u062c\u0627\u06cc \u0622\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 inet \u06cc\u0627 inet6 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f.<br \/>\n<strong><em>protocol:<\/em><\/strong> \u0627\u06cc\u0646 \u0644\u063a\u062a \u06cc\u06a9 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u06cc\u06a9 \u06cc\u0627 \u0686\u0646\u062f\u06cc\u0646 protocol \u0628\u0627\u0634\u062f \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block out on em0 inet proto {tcp,udp} from any to any port {80,443}<\/pre>\n<p>\u0645\u06cc\u200c\u062f\u0648\u0646\u0645 \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0631\u0648 \u0642\u0628\u0644\u0627\u064b \u0632\u062f\u0647 \u0628\u0648\u062f\u0645 \u0648\u0644\u06cc \u0627\u06cc\u0646\u062c\u0627 \u0628\u0631\u0627\u0645 \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0686\u0646\u062f\u06cc\u0646 \u0646\u06a9\u062a\u0647 \u062f\u0627\u0634\u062a: \u0627\u0644\u0641) \u0644\u06cc\u0633\u062a\u200c\u0647\u0627 \u0641\u0631\u0627\u0645\u0648\u0634 \u0646\u0634\u0647 \u0628) \u0644\u063a\u062a protocol \u0631\u0648 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0635\u0648\u0631\u062a proto \u0646\u0648\u0634\u062a. \u067e\u0631\u0648\u062a\u06a9\u0644\u200c\u0647\u0627\u06cc \u0632\u06cc\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>tcp<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>udp<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>icmp<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>icmp6<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 \u067e\u0631\u0648\u062a\u06a9\u0644 \u0645\u0639\u062a\u0628\u0631 \u0627\u0632 \u0641\u0627\u06cc\u0644 etc\/protocols\/<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0634\u0645\u0627\u0631\u0647 \u067e\u0631\u0648\u062a\u06a9\u0644\u200c\u0647\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 \u06f0 \u062a\u0627 \u06f2\u06f5\u06f5 \u0628\u0627\u0634\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/p>\n<\/li>\n<\/ul>\n<p><strong><em>src_addr, dst_addr:<\/em><\/strong>\u0628\u0631\u0627\u06cc src_addr \u0627\u0632 \u0644\u063a\u062a from \u0648 \u0628\u0631\u0627\u06cc dst_addr \u0627\u0632 \u0644\u063a\u062a to \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u062f\u0631 \u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc \u0628\u0627\u0644\u0627 \u0628\u0647 \u06a9\u0627\u0631 \u0628\u0631\u062f\u0647 \u0634\u062f. \u0622\u062f\u0631\u0633\u200c\u0647\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0647 \u0635\u0648\u0631\u062a\u200c\u0647\u0627\u06cc \u0632\u06cc\u0631 \u0628\u06a9\u0627\u0631 \u0631\u0648\u0646\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 IP \u0646\u0633\u062e\u0647 \u06f4 \u06cc\u0627 \u06f6<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 CIDR \u0647\u0645\u0627\u0646\u0646\u062f 46.41.205.73\/32<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0630\u06a9\u0631 FQDN<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0646\u0627\u0645 \u06cc\u06a9 interface \u06cc\u0627 \u06af\u0631\u0648\u0647\u06cc \u0627\u0632 \u0622\u0646\u0647\u0627. (\u0632\u06cc\u0631\u0627 \u0628\u0647 \u0647\u0646\u06af\u0627\u0645 NAT \u06cc\u06a9\u06cc \u0627\u0632 \u062e\u0627\u0635\u06cc\u062a\u200c\u0647\u0627\u06cc \u0632\u06cc\u0628\u0627\u06cc pf \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u06a9\u0647 \u0634\u0645\u0627 \u06cc\u06a9 interface \u0631\u0627 NAT \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u0646\u0647 \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u0631\u0627! \u0648 \u0627\u06cc\u0646 \u0632\u0645\u0627\u0646\u06cc \u0628\u0647 \u062f\u0631\u062f \u0645\u06cc\u200c\u062e\u0648\u0631\u062f \u06a9\u0647 \u0622\u062f\u0631\u0633 NAT \u0634\u062f\u0647 \u0639\u0648\u0636 \u0634\u0648\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u062d\u0627\u0644\u062a \u062d\u062a\u0645\u0627\u064b interface \u0645\u0631\u0628\u0648\u0637\u0647 \u0628\u0627\u06cc\u062f \u062f\u0631 () \u0628\u0627\u0634\u062f.\u06a9\u0644\u0627 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 IP \u0622\u062f\u0631\u0633 \u0634\u0645\u0627 update \u0634\u0648\u062f \u062f\u0627\u062e\u0644 () \u06af\u0630\u0627\u0634\u062a\u0646 \u0622\u0646 \u06cc\u06a9 \u0628\u062d\u062b \u0627\u062c\u062a\u0646\u0627\u0628\u200c\u0646\u0627\u067e\u0630\u06cc\u0631 \u0627\u0633\u062a.)<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 table<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0646\u0627\u0645 \u06cc\u06a9 interface \u06a9\u0647 \u0628\u0627 netmask\/ \u062f\u0646\u0628\u0627\u0644 \u0634\u0648\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0646\u0627\u0645 \u06cc\u06a9 interface \u06a9\u0647 \u0628\u0627 \u06cc\u06a9\u06cc \u0627\u0632 \u06f3 \u0644\u063a\u062a \u0631\u0632\u0631\u0648 \u0634\u062f\u0647 \u0632\u06cc\u0631 \u062f\u0646\u0628\u0627\u0644 \u0634\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>network<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>broadcast<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>peer<\/p>\n<\/li>\n<\/ul>\n<p>\u0645\u062b\u0627\u0644\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0632\u062f \u0628\u0647 \u062d\u0627\u0644\u062a em0:broadcast \u0627\u0633\u062a. 0: \u0647\u0645 \u0628\u0639\u062f \u0627\u0632 \u0622\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0642\u0631\u0627\u0631 \u0628\u06af\u06cc\u0631\u062f \u06a9\u0647 \u0646\u0634\u0627\u0646\u06af\u0631 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0634\u0645\u0627 \u0627\u0632 alias IP \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u0647\u0645\u0627\u0646\u0646\u062f em0:network:0<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0644\u063a\u062a \u06a9\u0644\u06cc\u062f\u06cc any \u0628\u0647 \u0645\u0639\u0646\u06cc \u062a\u0645\u0627\u0645 IP \u0622\u062f\u0631\u0633\u200c\u0647\u0627.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 list \u0627\u0632 \u0622\u062f\u0631\u0633\u200c\u0647\u0627 \u0647\u0645\u0627\u0646\u0646\u062f {192.168.0.3 10.0.0.1!}<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0644\u063a\u062a \u06a9\u0644\u06cc\u062f\u06cc all \u0628\u0647 \u0645\u0639\u0646\u06cc from any to any<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0644\u063a\u062a \u06a9\u0644\u06cc\u062f\u06cc urpf-failed \u0628\u0647 \u062c\u0627\u06cc src_addr \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0646\u0634\u06cc\u0646\u062f. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u0627\u0632 \u0631\u0648\u06cc routing table \u0645\u06cc\u200c\u0641\u0647\u0645\u062f IP \u0645\u0630\u06a9\u0648\u0631spoof \u0634\u062f\u0647 \u0627\u0633\u062a \u06cc\u0627 \u062e\u06cc\u0631. \u0627\u06cc\u0646 \u0644\u063a\u062a \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0631\u0627 \u067e\u06cc\u0627\u062f\u0647 \u06a9\u0631\u062f\u0647 \u0627\u0633\u062a. \u0634\u0645\u0627 \u0645\u06cc \u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 rule \u0632\u06cc\u0631 \u0627\u06cc\u0646 router \u062e\u0648\u062f \u0631\u0627 \u0627\u0632 \u062f\u0633\u062a IP \u0647\u0627\u06cc spoof \u0634\u062f\u0647 \u0627\u0645\u0646 \u06a9\u0646\u06cc\u062f:<\/p>\n<\/li>\n<\/ul>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block in quick from urpf-failed label uRPF<\/pre>\n<p><strong><em>src_port, dst_port :<\/em><\/strong>\u0627\u0632 \u0644\u0627\u06cc\u0647 \u06f4 \u0647\u062f\u0631 IP \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 src_port \u0648 dst_port \u0631\u0627 \u0645\u0634\u062e\u0635 \u0646\u0645\u0648\u062f.\u067e\u0648\u0631\u062a\u200c\u0647\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 \u0639\u062f\u062f\u06cc \u0628\u06cc\u0646 0 \u062a\u0627 \u06f2\u06f5\u06f5<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 list \u0627\u0632 \u067e\u0648\u0631\u062a\u200c\u0647\u0627 \u0647\u0645\u0627\u0646\u0646\u062f {80 443}\u060c \u0627\u0644\u0628\u062a\u0647 \u0646\u0627\u06af\u0641\u062a\u0647 \u0646\u0645\u0627\u0646\u062f \u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0641\u0627\u06cc\u0644 etc\/services\/ \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u062f\u0631\u0648\u0627\u0642\u0639 \u062e\u0648\u062f pf \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u200c\u062f\u0647\u062f. \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062f\u0642\u062a \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">pass out on em0 inet proto tcp from any to any port = ssh<\/pre>\n<p>\u06a9\u0644\u0645\u0647 ssh \u0627\u0632 \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u0627\u062e\u0630 \u0634\u062f \u0648 \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0639\u062f\u062f 22 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u062f\u0631 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u067e\u0648\u0631\u062a \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f tcp \u06cc\u0627 udp \u0628\u0648\u062f\u0646 \u0622\u0646 \u0646\u06cc\u0632 \u0628\u0627\u06cc\u062f \u0645\u0634\u062e\u0635 \u06af\u0631\u062f\u062f.<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9 \u0645\u062d\u062f\u0648\u062f\u0647 \u067e\u0648\u0631\u062a:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>=! \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0639\u062f\u0645 \u062a\u0633\u0627\u0648\u06cc<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>&gt; \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u06a9\u0648\u0686\u06a9\u062a\u0631<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>&lt; \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0628\u0632\u0631\u06af\u062a\u0631<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>=&gt; \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u06a9\u0648\u0686\u06a9\u062a\u0631 \u0645\u0633\u0627\u0648\u06cc<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>=&lt; \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0628\u0632\u0631\u06af\u200c\u062a\u0631 \u0645\u0633\u0627\u0648\u06cc<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>&gt;&lt; \u06cc\u06a9 \u0645\u062d\u062f\u0648\u062f\u0647<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>&lt;&gt; \u0645\u0639\u06a9\u0648\u0633 \u06cc\u06a9 \u0645\u062d\u062f\u0648\u062f\u0647 (\u0639\u0645\u0644\u06af\u0631 \u0628\u0627\u06cc\u0646\u0631\u06cc)<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0634\u0627\u0645\u0644 \u06cc\u06a9 \u0645\u062d\u062f\u0648\u062f\u0647 (\u0639\u0645\u0644\u06af\u0631 \u0628\u0627\u06cc\u0646\u0631\u06cc)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong><em>tcp_flags:<\/em><\/strong>\u0641\u0644\u06af\u200c\u0647\u0627\u06cc TCP \u0631\u0648 \u0628\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u0627\u0632 proto tcp \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f check \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0641\u0631\u0645\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a flags check\/mask \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 flags S\/SA \u0645\u0648\u0686\u0648\u062f \u0628\u0627\u0634\u062f \u06cc\u0639\u0646\u06cc \u0628\u0647\u200c \u0628\u0633\u062a\u0647\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0641\u0644\u06af SYN \u0648 ACK \u062f\u0627\u0631\u0646\u062f \u0628\u0646\u06af\u0631 \u0648 SYN \u0622\u0646\u200c\u0647\u0627 \u0628\u0627\u06cc\u062f on \u0628\u0627\u0634\u062f. \u0641\u0644\u06af\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 TCP \u0627\u0632 \u0622\u0646\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u062f \u062f\u0631 \u0632\u06cc\u0631 \u0644\u06cc\u0633\u062a \u0634\u062f\u0647\u200c\u0627\u0646\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>FIN : F<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>SYN : S<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>RST : R<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>PUSH : P<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>ACK : A<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>URG : U<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>ECE : E<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>CWR : W<\/p>\n<\/li>\n<\/ul>\n<p><strong><em>state:<\/em><\/strong> \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0628\u0633\u06cc\u0627\u0631 \u0642\u0648\u06cc \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u06a9\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0646\u0642\u0627\u0637 \u0642\u0648\u062a \u0622\u0646 \u062f\u0631 stateful \u0628\u0648\u062f\u0646 \u0622\u0646 \u0627\u0633\u062a. \u0622\u062e\u0631\u06cc\u0646 \u06af\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062f\u0631 syntax \u0646\u0648\u0634\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f state \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0647 \u0635\u0648\u0631\u062a\u200c\u0647\u0627\u06cc \u0632\u06cc\u0631 \u0646\u0648\u0634\u062a\u0647 \u0634\u0648\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>no state: \u0628\u0627 TCP, UDP \u0648 ICMP \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u0631\u0627\u06cc connection \u0647\u0627\u06cc TCP \u0628\u0627\u06cc\u062f flags any \u0646\u06cc\u0632 \u0628\u06a9\u0627\u0631 \u0628\u0631\u062f\u0647 \u0634\u0648\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>keep state: \u0628\u0627 TCP, UDP \u0648 ICMP \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06cc\u0646 \u06af\u0632\u06cc\u0646\u0647 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0647\u0645\u0647 rule \u0647\u0627\u06cc \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>modulate state: \u062a\u0646\u0647\u0627 \u0628\u0627 TCP \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0648\u0642\u062a\u06cc \u0686\u0646\u06cc\u0646 state \u06cc \u0631\u0627 \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f PF \u0628\u0631\u0627\u06cc \u0628\u0633\u062a\u0647 \u06cc\u06a9 \u0633\u0631\u06cc \u0627\u0639\u062f\u0627\u062f \u062a\u0648\u0627\u0644\u06cc \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f : ISNs.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>synproxy state : \u0648\u0642\u062a\u06cc handshaking \u0635\u0648\u0631\u062a \u0646\u06af\u06cc\u0631\u062f \u0648 \u0641\u0642\u0637 \u06cc\u06a9 SYN \u0628\u06cc\u0627\u06cc\u062f \u0627\u06cc\u0646 \u06cc\u0639\u0646\u06cc \u0634\u0645\u0627 \u0645\u0648\u0631\u062f \u062d\u0645\u0644\u0647 synflood \u0642\u0631\u0627\u0631 \u06af\u0631\u0641\u062a\u0647\u200c\u0627\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0645\u0628\u0627\u0631\u0632\u0647 \u0628\u0627 \u0627\u06cc\u0646 \u0627\u0645\u0631 \u0631\u0627\u0647\u200c\u0647\u0627\u06cc\u06cc \u0647\u0645\u0686\u0648\u0646 \u06af\u0630\u0627\u0634\u062a\u0646 timeout \u0648 \u063a\u06cc\u0631\u0647 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u0647 \u0648\u0644\u06cc \u06af\u0631\u06cc\u0632 \u0627\u0635\u0644\u06cc \u0628\u0631\u0627\u06cc \u0645\u0628\u0627\u0631\u0632\u0647 \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0645\u0644\u0647 \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f \u0648 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0631\u0627\u0647 \u062f\u0641\u0627\u0639 \u0686\u0646\u062f \u0644\u0627\u06cc\u0647 \u0627\u0633\u062a. State \u0645\u0630\u06a9\u0648\u0631 \u0634\u0627\u0645\u0644 keep state \u0648 mudulate state \u0646\u06cc\u0632 \u0645\u06cc\u200c\u0634\u0648\u062f. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0627\u06cc\u0646 state \u06cc\u06a9 \u0636\u062f synflood \u0627\u0633\u062a.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0637\u0631\u0627\u062d\u06cc \u0641\u0631\u0645\u0648\u0644:<\/strong> \u0647\u0645\u0648\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0642\u0628\u0644 \u0627\u0632 \u0627\u0634\u0627\u0631\u0647 \u0628\u0647 syntax \u0627\u0635\u0644\u06cc \u06cc\u06a9 rule \u06a9\u0646\u0645 \u0642\u0648\u0644 \u062f\u0627\u062f\u0645 \u06cc\u06a9 \u0641\u0631\u0645\u0648\u0644 \u0628\u0631\u0627\u06cc \u062d\u0641\u0638 \u06a9\u0631\u062f\u0646 rule \u0647\u0627 \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0646\u062f\u0647\u200c\u0647\u0627\u06cc \u0645\u062d\u062a\u0631\u0645 \u062f\u0631\u0628\u06cc\u0627\u0631\u0645. \u0627\u0644\u0628\u062a\u0647 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0648\u0627\u0642\u0639\u0627\u064b \u0633\u062e\u062a\u200c\u062a\u0631 \u0627\u0632 awk \u0647\u0633\u062a. \u0686\u0648\u0646 awk \u0628\u0647 \u0635\u0648\u0631\u062a \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0627\u06cc\u0646\u062c\u0648\u0631\u06cc \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u0641\u0631\u0648\u0645\u0648\u0644\u06cc \u0647\u0633\u062a. \u067e\u0633 \u0628\u0647\u062a\u0631\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u06cc\u0646\u0647 \u06a9\u0647 \u0686\u0646\u062f \u062a\u0627 \u0646\u06a9\u062a\u0647 \u0631\u0648 \u0627\u0632 \u062f\u0644 rule \u0647\u0627 \u0628\u06a9\u0634\u06cc\u0645 \u0628\u06cc\u0631\u0648\u0646 \u0648 \u0627\u0648\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u062e\u0648\u062f\u0645\u0648\u0646 Bold \u06a9\u0646\u06cc\u0645 \u0648 \u0646\u0633\u0628\u062a \u062f\u0647\u06cc \u0630\u0647\u0646\u06cc \u06a9\u0646\u06cc\u0645 \u0648 \u0645\u062c\u0645\u0648\u0639 \u0646\u06a9\u0627\u062a \u0632\u06cc\u0631 \u06cc\u06a9 \u0641\u0631\u0645\u0648\u0644 \u0646\u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0646\u062f\u0647 \u062e\u0648\u0627\u0647\u062f \u0634\u062f:<\/p>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>\u0627\u06af\u0631 \u0642\u0631\u0627\u0631\u0647 \u0631\u0648\u0644\u06cc \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0622\u062f\u0631\u0633 \u0645\u0628\u062f\u0623 \u0648 \u0645\u0642\u0635\u062f (from \u0648 to ) \u0631\u0648 \u06cc\u0647 \u062d\u0644\u0627\u062c\u06cc \u06a9\u0646\u06cc\u062f \u0628\u0628\u06cc\u0646\u06cc\u062f \u0628\u0627\u06cc\u062f in \u0628\u0627\u0634\u0646 \u06cc\u0627 out.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0622\u06cc\u0627 \u067e\u0648\u0631\u062a\u06cc \u0628\u0627\u06cc\u062f \u0645\u0634\u062e\u0635 \u0628\u0634\u0647\u061f \u067e\u0633 \u0647\u0645\u06cc\u0634\u0647 \u0627\u0632 etc\/services\/ \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0647\u0645 \u062f\u0631 \u0631\u0648\u0644 \u062e\u0648\u0646\u06cc \u0648 \u0647\u0645 \u062f\u0631 \u0631\u0648\u0644 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0647 \u0645\u0634\u06a9\u0644 \u0646\u062e\u0648\u0631\u06cc\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0628\u0647 \u0647\u06cc\u0686 \u0639\u0646\u0648\u0627\u0646 \u0628\u0647 \u0637\u0648\u0631 \u0645\u0633\u062a\u0642\u06cc\u0645 \u0627\u0632 interface \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0646\u06cc\u062f \u0648 \u0627\u0632 \u0645\u0627\u06a9\u0631\u0648\u200c\u0647\u0627\u06cc\u06cc \u0628\u0627 \u0646\u0627\u0645\u200c\u0647\u0627\u06cc \u0645\u0631\u062a\u0628\u0637 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0627\u0632 table\u060c macro \u060c \u0648 list \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0627\u06cc\u0646 \u0631\u0648 \u0622\u0648\u06cc\u0632\u0647 \u06af\u0648\u0634 \u062e\u0648\u062f \u06a9\u0646\u06cc\u062f. \u062d\u062a\u06cc \u0627\u06af\u0631 \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u062f\u0627\u0631\u06cc\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0627\u06af\u0631 not \u062f\u0627\u0631\u06cc\u062f \u0637\u0648\u0631\u06cc \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u06a9\u0647 \u0628\u0647 \u0686\u0634\u0645 \u0628\u06cc\u0627\u062f.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u0627\u06af\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0627\u0635\u06cc \u0647\u0645 \u0627\u0632 udp \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u0647 \u0648\u0647\u0645 \u0627\u0632 tcp \u0627\u06cc\u0646\u062c\u0627 \u0648\u0627\u0642\u0639\u0627\u064b list \u0647\u0627 \u0628\u0647 \u06a9\u0645\u06a9\u062a\u0648\u0646 \u0645\u06cc\u0627\u062f. \u062e\u06cc\u0644\u06cc \u0627\u0632 \u0631\u0648\u0644\u200c\u0647\u0627 \u0628\u0627\u06cc\u062f \u0628\u0631\u0627\u06cc \u0647\u0631 \u062f\u0648 \u062c\u0647\u062a \u0646\u0648\u0634\u062a\u0647 \u0634\u0648\u062f \u06a9\u0647 \u0628\u0639\u062f\u0627\u064b \u0628\u0627 \u0622\u0646 \u0628\u0631\u062e\u0648\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u06af\u0648\u0634\u0632\u062f \u0628\u0647 \u062e\u0627\u0637\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f.<\/p>\n<\/li>\n<\/ul>\n<p style=\"font-size: 18px;\"><strong>\u06f3. \u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u062f\u0631 \u0628\u0627\u0628 Packet Filtering:<\/strong><\/p>\n<p>\u06cc\u06a9 \u0645\u062f\u06cc\u0631 \u0633\u06cc\u0633\u062a\u0645 \u062f\u0631 \u062f\u0648 \u062d\u0627\u0644\u062a \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0631\u0648\u0644 \u0647\u0627\u06cc \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u062e\u0648\u062f \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0645\u0627\u06cc\u062f. \u06cc\u06a9\u06cc \u0628\u0633\u062a\u0646 \u0627\u0632 \u0628\u0627\u0644\u0627 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u0648 \u062f\u06cc\u06af\u0631\u06cc \u0628\u0633\u062a\u0646 \u0627\u0632 \u067e\u0627\u06cc\u06cc\u0646 \u0628\u0647 \u0628\u0627\u0644\u0627 \u06a9\u0647 \u0627\u0648\u0644\u06cc \u062d\u0627\u0644\u062a \u0627\u0645\u0646\u200c\u062a\u0631\u06cc \u062f\u0627\u0631\u06cc\u062f. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u062f\u0631 \u062d\u0627\u0644\u062a \u0627\u0648\u0644 \u0628\u0647 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0645\u06cc\u200c\u06af\u0648\u06cc\u062f \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0628\u0633\u062a\u0647 \u0628\u0627\u0634\u062f \u0648 \u0647\u0631 case \u06a9\u0647 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u0628\u0627\u0632 \u0628\u0627\u0634\u062f \u0628\u0627\u0632 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0637\u0628\u06cc\u0639\u062a\u0627\u064b \u0627\u06cc\u0646 \u062d\u0627\u0644\u062a \u0647\u0645 \u062f\u0631\u0647\u0645 \u0631\u06cc\u062e\u062a\u06af\u06cc \u0646\u062f\u0627\u0631\u062f \u0648 \u0627\u0645\u0646\u200c\u062a\u0631 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u0634\u0645\u0627 \u0628\u0631\u0627\u06cc \u0628\u0633\u062a\u0646 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0628\u0647 \u062f\u0648 rule \u0633\u0627\u062f\u0647 \u0632\u06cc\u0631 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block in all\r\nblock out all<\/pre>\n<p>\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u0627\u0644\u0627 \u06af\u0641\u062a\u0647 \u0634\u062f \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0628\u0633\u062a\u0647 \u0634\u062f. \u0627\u0644\u0628\u062a\u0647 \u0628\u0627\u06cc\u062f loopback \u0631\u0648 \u0628\u0631\u0627\u06cc \u0645\u0635\u0627\u0631\u0641 \u062f\u0627\u062e\u0644\u06cc \u0628\u0627\u0632 \u0628\u06af\u0630\u0627\u0631\u06cc\u0645. \u0628\u062f\u06cc\u0646 \u0645\u0646\u0638\u0648\u0631 \u0634\u0645\u0627 \u062f\u0631 \u0642\u0633\u0645\u062a option \u0647\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0641\u0631\u0645\u0627\u0646 \u0631\u0648\u0628\u0631\u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">set skip on lo0<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0622\u0647\u0633\u062a\u0647 \u0622\u0647\u0633\u062a\u0647 \u0641\u0631\u0627\u0645\u06cc\u0646 option\u0647\u0627 \u0628\u0631\u0627\u06cc\u0645\u0627\u0646 \u0645\u0644\u0645\u0648\u0633 \u0645\u06cc\u200c\u06af\u0631\u062f\u0646\u062f.<br \/>\n<strong>\u06cc\u0647 \u0646\u06a9\u062a\u0647 \u0627\u0633\u0627\u0633\u06cc:<\/strong> \u06cc\u0647 \u0646\u06a9\u062a\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062e\u06cc\u0644\u06cc \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0628\u0627 \u0622\u0646 \u0628\u0631\u062e\u0648\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f \u0645\u0634\u06a9\u0644 syntax error \u0647\u0633\u062a . \u062e\u0648\u0628 \u0645\u0633\u0644\u0645\u0627\u064b \u06f2 \u0646\u0648\u0639 \u0627\u0632 \u0627\u06cc\u0646 error \u062f\u0627\u0631\u06cc\u0645:<\/p>\n<ul>\n<ul>\n<li style=\"margin-right: 30px;\">\n<p>\u06cc\u06a9\u06cc \u062f\u0631\u0633\u062a \u0627\u0639\u0645\u0627\u0644 \u0646\u06a9\u0631\u062f\u0646 \u0631\u0648\u0644 \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 pf \u0628\u0627\u06cc\u062f \u0633\u0648\u0627\u062f\u0634 \u0631\u0648 \u0628\u0628\u0631\u0647 \u0628\u0627\u0644\u0627.<\/p>\n<\/li>\n<li style=\"margin-right: 30px;\">\n<p>\u062f\u0648\u0645 \u0642\u0636\u06cc\u0647 \u0645\u0647\u0627\u062c\u0631\u062a OpenBSD 4.6 \u0628\u0647 OpenBSD 4.7 \u06a9\u0647 \u062f\u0631 \u06f2\u06f0\u06f0\u06f9 \u0635\u0648\u0631\u062a \u06af\u0631\u0641\u062a \u0648 syntax \u062e\u06cc\u0644\u06cc \u0627\u0632 \u0645\u0648\u0627\u0631\u062f PF \u0631\u0648 \u0639\u0648\u0636 \u06a9\u0631\u062f. \u0627\u06cc\u0646 \u0645\u0633\u0623\u0644\u0647 \u0645\u062e\u0635\u0648\u0635\u0627\u064b \u062f\u0631 NAT \u06a9\u0647 \u062f\u0631 \u0634\u0645\u0627\u0631\u0647\u200c\u0647\u0627\u06cc \u0628\u0639\u062f\u06cc \u062e\u0648\u0627\u0647\u06cc\u0645 \u067e\u0631\u062f\u0627\u062e\u062a \u0628\u0647 \u0634\u062f\u062a \u062f\u06cc\u062f\u0647 \u0645\u06cc\u0634\u0647. \u0627\u0644\u0628\u062a\u0647 \u0627\u06cc\u0646 \u0645\u0647\u0627\u062c\u0631\u062a \u062f\u0631 \u06f3 \u0645\u0631\u062d\u0644\u0647 \u0627\u062a\u0641\u0627\u0642 \u0627\u0641\u062a\u0627\u062f \u06cc\u06a9\u06cc milestone 3.x \u0628\u0648\u062f \u062f\u06cc\u06af\u0631\u06cc \u062f\u0631 x.5 \u0628\u0648\u062f. \u06a9\u0627\u0631\u0628\u0631 \u0648\u0642\u062a\u06cc \u062c\u0633\u062a\u062c\u0648 \u0645\u06cc\u200c\u06a9\u0646\u0647 \u0648 \u06cc\u0647 documentation \u067e\u06cc\u062f\u0627 \u0645\u06cc\u200c\u06a9\u0646\u0647 \u0628\u0627\u06cc\u062f \u0628\u0628\u06cc\u0646\u0647 \u0627\u0648\u0646 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0686\u0647 syntax\u06cc \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647. \u0645\u0646 \u06a9\u0644 \u0645\u0633\u062a\u0646\u062f\u0627\u062a\u0645 \u0631\u0648 \u0628\u0631 \u0627\u0633\u0627\u0633 PF \u062c\u062f\u06cc\u062f \u0628\u0631\u0627\u062a\u0648\u0646 \u0646\u0648\u0634\u062a\u0645.<\/p>\n<\/li>\n<\/ul>\n<\/ul>\n<p>\u0627\u06cc\u0646 \u0631\u0648 \u0627\u0648\u0644 \u0645\u062b\u0627\u0644\u200c\u0647\u0627 \u06af\u0641\u062a\u0645 \u06a9\u0647 \u0646\u06af\u06cc\u062f \u0631\u0648\u0644\u06cc \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f\u06cc\u062f \u06cc\u0627 \u062f\u0631 \u0641\u0644\u0627\u0646 \u06a9\u062a\u0627\u0628 \u062e\u0648\u0646\u062f\u06cc\u062f \u06a9\u0627\u0631 \u0646\u0645\u06cc\u200c\u06a9\u0646\u0647.<\/p>\n<p><strong>\u0686\u0646\u062f \u0645\u062b\u0627\u0644 \u0628\u0627 \u0639\u0645\u0644\u06af\u0631\u200c\u0647\u0627\u06cc \u067e\u0648\u0631\u062a:<\/strong> \u0641\u0631\u0636 \u06a9\u0646\u06cc\u062f \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u200c\u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc \u0645\u0628\u0646\u06cc \u0628\u0631 \u0632\u06cc\u0631 \u06f1\u06f0\u06f2\u06f4 \u0631\u0627 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u0645 \u0628\u0644\u0627\u06a9 \u06a9\u0646\u06cc\u0645 \u0648\u0644\u06cc \u067e\u0648\u0631\u062a \u0648\u0631\u0648\u062f\u06cc \u06f2\u06f2 \u0628\u0627\u0632 \u0628\u0627\u0634\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block in on em0 inet proto {tcp,udp} from any to any port 0:1023 \r\npass in on em0 inet proto tcp from any to any port ssh<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0628\u06af\u0648\u06cc\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u0627\u0648\u0644 \u0647\u0645\u0647 \u0686\u06cc \u0645\u06af\u0631 \u0628\u0633\u062a\u0647 \u0646\u0634\u062f\u061f \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634 \u0628\u06cc\u0634\u062a\u0631 \u0628\u0627 \u0631\u0648\u0644\u200c\u0647\u0627 \u0628\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645 \u062a\u0627 \u062f\u0633\u062a\u0645\u0627\u0646 \u0628\u06cc\u0627\u06cc\u062f \u0648\u0627\u06af\u0631 \u0646\u0647 \u062d\u0642 \u0628\u0627 \u0634\u0645\u0627\u0633\u062a \u062f\u0646\u06cc\u0627\u06cc \u0648\u0627\u0642\u0639\u06cc \u0631\u0648\u0644 \u0646\u0648\u06cc\u0633\u06cc \u0627\u06cc\u0646\u0637\u0648\u0631 \u0646\u06cc\u0633\u062a.<\/p>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0646\u06a9\u062a\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062f\u0631 \u0628\u0627\u0644\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a \u0641\u0642\u0637 \u067e\u0648\u0631\u062a tcp \u0622\u0646 \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0631\u062f\u06cc\u0645 \u0648 \u0647\u0645\u0686\u0646\u0627\u0646 udp:22 \u0628\u0633\u062a\u0647 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u0633\u067e\u0633 \u0648\u0642\u062a\u06cc \u0627\u0632 \u0622\u0646 query \u0645\u06cc\u06af\u06cc\u0631\u0645 \u0686\u0646\u06cc\u0646 \u0646\u062a\u06cc\u062c\u0647\u200c\u0627\u06cc \u0645\u06cc\u0628\u06cc\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">root@firewall:~ # pfctl -sr\r\nblock drop in on em0 inet proto udp from any to any port 0:1023\r\npass in on em0 inet proto tcp from any to any port = ssh flags S\/SA keep state\r\n<\/pre>\n<p><strong>\u067e\u0631\u0648\u062a\u06a9\u0644 ICMP:<\/strong> \u0627\u0632 \u0627\u06cc\u0646 \u067e\u0631\u0648\u062a\u06a9\u0644 \u0628\u0647 \u0635\u0648\u0631\u062a \u062c\u062f\u06cc \u062f\u0631 \u0631\u0641\u0639 \u0627\u0634\u06a9\u0627\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0627\u0645\u0627 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0645\u0647\u0645 \u0627\u0633\u062a \u0633\u0631\u0648\u0631 \u0634\u0645\u0627\u0633\u062a. \u0627\u06cc\u0646\u06a9\u0647 \u0633\u0631\u0648\u0631 \u0634\u0645\u0627 \u06a9\u062c\u0627\u060c \u0628\u0631\u0627\u06cc \u0686\u0647 \u06a9\u0627\u0631\u06cc\u060c\u200c \u0648 \u062f\u0631 \u0686\u0647 \u0633\u0637\u062d \u062f\u0633\u062a\u0631\u0633\u06cc \u0642\u0631\u0627\u0631 \u062f\u0627\u0631\u062f. \u0627\u06af\u0631 \u0628\u0647 \u0627\u06cc\u0646 \u0633\u0624\u0627\u0644\u0627\u062a \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u067e\u0627\u0633\u062e \u062f\u0647\u06cc\u062f \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0645\u0627\u0645 type \u0647\u0627\u06cc ICMP \u0631\u0627 \u0637\u0628\u0642 \u062f\u0644\u062e\u0648\u0627\u0647 \u062e\u0648\u062f customize \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0627 \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0633\u0627\u062f\u0647 ICMP \u0631\u0627 \u062f\u0631 pf \u0628\u06cc\u0627\u0646 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645\u060c \u062e\u0637 \u0631\u0648\u0628\u0631\u0648 ping \u0631\u0627 \u0645\u06cc\u200c\u0628\u0646\u062f\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">block inet proto icmp icmp-type echoreq<\/pre>\n<p>\u0641\u0642\u0637 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06cc\u06a9 \u0645\u0631\u062c\u0639 type \u0647\u0627\u06cc ICMP \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0642\u06cc\u0647 \u0642\u0636\u0627\u06cc\u0627 \u062d\u0644 \u0627\u0633\u062a.<\/p>\n<p><strong>Transparent \u06a9\u0631\u062f\u0646 Squid \u0628\u0627 PF:<\/strong> \u0628\u0631\u0627\u06cc \u0686\u0646\u06cc\u0646 \u06a9\u0627\u0631\u06cc \u06a9\u0627\u0641\u06cc\u0633\u062a \u0627\u0632 \u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">rdr pass inet proto tcp from 192.168.3.0\/24 to any port 80 -&gt; 192.168.3.1 port 3129\r\nblock in\r\npass in quick on $int_if\r\npass in quick on $wi_if\r\npass out keep state<\/pre>\n<p>\u0646\u06a9\u062a\u0647\u200c\u0627\u06cc \u06a9\u0647 \u0627\u06cc\u0646\u062c\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u0646\u0628\u0627\u06cc\u062f \u0627\u0632 rdr on \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0628\u0644\u06a9\u0647 \u062d\u062a\u0645\u0627\u064b \u0628\u0627\u06cc\u062f \u0627\u0632 rdr pass \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0627\u0632 \u0646\u06a9\u062a\u0647\u200c\u0627\u06cc \u062f\u06cc\u06af\u0631 \u06a9\u0647 \u062e\u06cc\u0644\u06cc \u0636\u0631\u0648\u0631\u06cc \u0627\u0633\u062a \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f rdr \u0631\u0627 \u0642\u0628\u0644 \u0627\u0632 \u0647\u0631 pass \u06cc\u0627 block \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f. \u0632\u06cc\u0631\u0627 \u0627\u06cc\u0646 \u0631\u0648\u0644 \u0642\u0628\u0644 \u0627\u0632 Filtering \u0628\u0627\u06cc\u062f \u0646\u0648\u0634\u062a\u0647 \u0634\u0648\u062f.(\u0645\u0628\u062d\u062b \u0645\u0628\u0648\u0637 \u0628\u0647 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u0641\u0627\u06cc\u0644 pf.conf) \u062f\u0631 \u0645\u0637\u0627\u0644\u0628 \u0628\u0639\u062f\u06cc \u0628\u06cc\u0634\u062a\u0631 \u0628\u0627 rdr \u0622\u0634\u0646\u0627 \u0645\u06cc\u200c\u0634\u0648\u06cc\u0645.<\/p>\n<p style=\"font-size: 17px;\"><strong> \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0628\u0633\u06cc\u0627\u0631 \u062d\u0627\u0626\u0632 \u0627\u0647\u0645\u06cc\u062a \u0627\u0633\u062a \u0627\u06cc\u0646 \u0635\u0631\u0641\u0627 \u06cc\u06a9 \u0622\u0634\u0646\u0627\u06cc\u06cc \u0627\u0648\u0644\u06cc\u0647 \u0628\u0627 PF \u0628\u0648\u062f. \u0648 \u062f\u0631 \u0645\u0637\u0627\u0644\u0628 \u0628\u0639\u062f\u06cc \u0628\u0647 \u0635\u0648\u0631\u062a \u062c\u062f\u06cc \u0648 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648 \u0647\u0631 \u0634\u0645\u0627\u0631\u0647 \u0628\u0631\u0627\u06cc \u0642\u0636\u06cc\u0647\u200c\u0627\u06cc \u062e\u0627\u0635 \u062f\u0631 PF \u0645\u0637\u0644\u0628 \u062e\u0648\u0627\u0647\u0645 \u0646\u0648\u0634\u062a.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0634\u0645\u0627\u0631\u0647 \u0642\u0628\u0644 \u06cc\u06a9 FreeBSD-Box \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 PF \u06a9\u0647 \u0645\u062e\u0641\u0641 Packet Filter \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0622\u0645\u0627\u062f\u0647 \u06a9\u0631\u062f\u06cc\u0645. \u0627\u06cc\u0646 \u0634\u0645\u0627\u0631\u0647 \u06a9\u0644\u0627\u064b \u0628\u0647 \u0627\u06cc\u0646 Firewall \u0645\u06cc\u200c\u067e\u0631\u062f\u0627\u0632\u06cc\u0645. \u0627\u06af\u0631 \u0627\u0632 iptables \u0628\u0647 \u0627\u06cc\u0646 \u0633\u0645\u062a \u0627\u0648\u0645\u062f\u06cc\u062f \u06cc\u0627 \u0647\u0631 \u06af\u0648\u0646\u0647 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u062f\u06cc\u06af\u0631\u06cc\u060c \u062f\u0646\u0628\u0627\u0644 \u0627\u06cc\u0646 \u0646\u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0622\u0646\u0686\u0647 \u0631\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0645\u0628\u062f\u0623 \u0622\u0645\u0648\u062e\u062a\u06cc\u062f \u0627\u06cc\u0646\u062c\u0627 \u0628\u062f\u0646\u0628\u0627\u0644\u0634 \u0628\u0627\u0634\u06cc\u062f\u060c \u0628\u0644\u06a9\u0647 \u062f\u0646\u0628\u0627\u0644 \u0622\u0646 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u062e\u0648\u062f &hellip; <a href=\"https:\/\/pahlevanzadeh.net\/?p=297\" class=\"more-link\">\u0627\u062f\u0627\u0645\u0647 \u062e\u0648\u0627\u0646\u062f\u0646 <span class=\"screen-reader-text\">\u0646\u0635\u0628 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0641\u0627\u06cc\u0631\u0648\u0644 PF \u062f\u0631 FreeBSD[\u0627\u06cc\u0646 \u0642\u0633\u0645\u062a: packet filtering] (\u0634\u0645\u0627\u0631\u0647 \u062f\u0648\u0645)<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,2,111,67],"tags":[26,143,139,140,142,144,141,52],"_links":{"self":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts\/297"}],"collection":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297"}],"version-history":[{"count":71,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":903,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts\/297\/revisions\/903"}],"wp:attachment":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}