{"id":3460,"date":"2019-09-04T19:20:31","date_gmt":"2019-09-04T14:50:31","guid":{"rendered":"https:\/\/www.irwebhost.com\/blog\/?p=3460"},"modified":"2019-09-04T19:20:32","modified_gmt":"2019-09-04T14:50:32","slug":"%d9%86%d8%ad%d9%88%d9%87-block-unblock-%db%8c%da%a9-ip-%d8%a8%d8%a7-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-iptables","status":"publish","type":"post","link":"https:\/\/www.irwebhost.com\/blog\/%d9%86%d8%ad%d9%88%d9%87-block-unblock-%db%8c%da%a9-ip-%d8%a8%d8%a7-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-iptables\/","title":{"rendered":"\u0646\u062d\u0648\u0647 block\/unblock \u06cc\u06a9 IP \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 iptables"},"content":{"rendered":"<p>\u06af\u0627\u0647\u06cc \u0644\u0627\u0632\u0645 \u0627\u0633\u062a \u06a9\u0647 \u06cc\u06a9 IP \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0628\u0644\u0627\u06a9 \u06a9\u0646\u06cc\u062f \u0648 \u06cc\u0627 \u0627\u06cc\u0646\u06a9\u0647 \u0627\u0632 \u0628\u0644\u0627\u06a9 \u062e\u0627\u0631\u062c \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0628\u0644\u0627\u06a9 \u06a9\u0631\u062f\u0646 IP \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc <strong>iptables <\/strong>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06a9\u0627\u0631\u0628\u0631 root \u0644\u0627\u06af\u06cc\u0646 \u06a9\u0646\u06cc\u062f \u0648 \u0633\u067e\u0633 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f.<\/p>\n<pre class=\"\">iptables -A INPUT -s IP-ADDRESS -j DROP<\/pre>\n<h2>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 iptables<\/h2>\n<p>\u0627\u06af\u0631 \u0627\u0632 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u062c\u062f\u0627\u0648\u0644 IP \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u062f\u0633\u062a\u0648\u0631 \u0641\u0648\u0642 \u0631\u0627 \u0628\u0647 \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0627\u0645\u0627 \u0627\u06af\u0631 \u0641\u0642\u0637 \u0642\u0635\u062f \u062f\u0627\u0631\u06cc\u062f \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u06cc\u06a9 \u067e\u0648\u0631\u062a \u0627\u0632 \u06cc\u06a9 IP \u0631\u0627 \u0628\u0644\u0627\u06a9 \u06a9\u0646\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. (\u062f\u0631 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u067e\u0648\u0631\u062a 22 \u0627\u0632 \u0622\u06cc \u067e\u06cc 192.168.2.1 \u0628\u0644\u0627\u06a9 \u0634\u062f\u0647 \u0627\u0633\u062a.)<\/p>\n<pre class=\"\">iptables -A INPUT -s 192.168.2.1 -p tcp --destination-port 22 -j DROP<\/pre>\n<p>\u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0647\u0627\u06cc CentOS\u060c RHEL \u0648 Fedora \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 IP \u0631\u0627 \u0628\u0644\u0627\u06a9 \u0645\u06cc \u06a9\u0646\u0646\u062f \u0648 \u0622\u0646 \u0631\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 \u06a9\u0627\u0646\u0641\u06cc\u06af (Config File) \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<pre id=\"crayon-5d6fc6c2db18d265848581-2\" class=\"crayon-line crayon-striped-line\">iptables -A INPUT -s 192.168.2.1 -j DROP\nservice iptables save<\/pre>\n<h2>\u0646\u062d\u0648\u0647 Unblock \u06a9\u0631\u062f\u0646 \u06cc\u06a9 IP \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633<\/h2>\n<p>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u06cc\u0646\u062a\u06a9\u0633 \u0632\u06cc\u0631 \u0642\u0627\u062f\u0631 \u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u0648\u062f IP \u0631\u0627 \u0627\u0632 \u062d\u0627\u0644\u062a \u0628\u0644\u0627\u06a9 \u062e\u0627\u0631\u062c \u0646\u0645\u0627\u06cc\u06cc\u062f (d- \u0642\u0627\u0646\u0648\u0646 \u0645\u062f\u0646\u0638\u0631 \u0631\u0627 \u0627\u0632 \u062c\u062f\u0648\u0644 \u062d\u0630\u0641 \u0645\u06cc \u06a9\u0646\u062f).<\/p>\n<pre class=\"\">iptables -D INPUT -s 192.168.2.1 -j DROP\nservice iptables save<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u06af\u0627\u0647\u06cc \u0644\u0627\u0632\u0645 \u0627\u0633\u062a \u06a9\u0647 \u06cc\u06a9 IP \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0628\u0644\u0627\u06a9 \u06a9\u0646\u06cc\u062f \u0648 \u06cc\u0627 \u0627\u06cc\u0646\u06a9\u0647 \u0627\u0632 \u0628\u0644\u0627\u06a9 \u062e\u0627\u0631\u062c \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0628\u0644\u0627\u06a9 \u06a9\u0631\u062f\u0646 IP \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc iptables \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06a9\u0627\u0631\u0628\u0631 root \u0644\u0627\u06af\u06cc\u0646 \u06a9\u0646\u06cc\u062f \u0648 \u0633\u067e\u0633 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f. iptables -A INPUT [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[394,395,397,396],"class_list":["post-3460","post","type-post","status-publish","format-standard","hentry","category-11","tag-block-unblock------iptables","tag-iptables","tag-unblock--ip---iptables","tag---ip---iptables"],"_links":{"self":[{"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/posts\/3460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3460"}],"version-history":[{"count":1,"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/posts\/3460\/revisions"}],"predecessor-version":[{"id":3461,"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/posts\/3460\/revisions\/3461"}],"wp:attachment":[{"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.irwebhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}