{"id":323489,"date":"2021-05-20T15:01:24","date_gmt":"2021-05-20T15:01:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=323489"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=323489","title":{"rendered":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e API CrowdSec"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430\u0448\u0438 \u043f\u043e\u0441\u0442\u044b, \u0442\u043e \u0441\u043a\u0430\u0436\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435. CrowdSec \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043d-\u043b\u0438\u0441\u0442\u043e\u0432, \u043f\u0440\u0438\u0447\u0435\u043c \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u0438 \u043e\u0431\u0449\u0438\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 CrowdSec \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445. <\/p>\n<p>  \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 CrowdSec 1.x \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b.<br \/>  \u0427\u0442\u043e \u043e\u043d \u0443\u043c\u0435\u0435\u0442?<\/p>\n<p>  \u041d\u0430\u0448 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0435\u0440\u0435\u0433\u0443\u0442 \u043f\u043e\u043a\u043e\u0439 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u044b. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 API \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0443\u0447\u0435\u0442 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0437\u0430 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438. <\/p>\n<p>  \u0427\u0442\u043e \u0437\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f? \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 \u0438\u043b\u0438 \u0446\u0435\u043b\u043e\u043c\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0435\u0441\u043b\u0438 \u0430\u0442\u0430\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0443 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u043b\u044e\u0447 \u043d\u0430\u0448\u0435\u0433\u043e API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 CrowdSec. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0427\u0435\u0440\u0435\u0437 API \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\u0438, push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041a\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e, API \u2014 \u0435\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043a \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 CrowdSec \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438, \u0442\u0435 \u0436\u0435 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u044b, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u00ab\u043f\u043e \u043c\u0435\u0441\u0442\u0443\u00bb, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<h3>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f API<\/h3>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e CrowdSec \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (CLI). \u0412\u0430\u0448\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 API. <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430. \u0423 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u0445\u0430\u0431\u0435 CrowdSec, \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043b\u043b-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u0432\u0430\u0441, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<p>  <code>cscli bouncers add BouncerdeTest<\/code><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ur\/qx\/sp\/urqxspbzz2qn_-yk6awrkc_4p7w.png\"><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <code>cscli machines add MachinedeTest \u2013auto<\/code><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sb\/ph\/rx\/sbphrx6o2vdjifv8djalbmx8kg8.png\"><\/p>\n<p>  \u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043b\u044f \u0432\u0430\u0441 \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 yaml, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0437\u0430\u0442\u0435\u043c \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/am\/m9\/dk\/amm9dkhpksvz1nxrcbvotuvmpe4.png\"><\/p>\n<p>  \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 API \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <code>cscli lapi register -u &lt;api_url&gt;<\/code><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u0430 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 API. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:<\/p>\n<p>  <code>cscli machines validate MachinedeTest<\/code><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/by\/w7\/ib\/byw7ib3giwhelblm2slcmvf6yyi.png\"><\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API \u0441 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430\u043c\u0438<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 API \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c HTTPS. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_q\/ja\/sx\/_qjasx1vs-ab-jto9ow5cfvurwk.png\"><\/p>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u0432 API \u0438\u0437 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c 2 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<p>  <b>\u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (getDecisions)<\/b><\/p>\n<p>  \u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b API \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0438\u043c\u0435\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. <\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0437\u0432\u0430\u0442\u044c API (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Curl), \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c IP: <\/p>\n<p>  <code>curl -H &quot;X-Api-Key: e73e3672427ecd8cd9a6487f7e8f4f03&quot; http:\/\/localhost:8080\/v1\/decisions?ip=98.65.32.47<\/code><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447 API \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ?ip, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <code>[{&quot;duration&quot;:&quot;2h25m47.212560128s&quot;,&quot;id&quot;:1023,&quot;origin&quot;:&quot;cscli&quot;,&quot;scenario&quot;:&quot;manual 'ban' from '939972095cf1459c8b22cc608eff85daEb4yoi2wiTD7Y3fA'&quot;,&quot;scope&quot;:&quot;Ip&quot;,&quot;type&quot;:&quot;ban&quot;,&quot;value&quot;:&quot;1.2.3.4&quot;}]<\/code><\/p>\n<p>  \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ?range, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0441\u0435\u0442\u0438, \u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 scope+value \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0435 \u0441\u0435\u0430\u043d\u0441\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <code>curl -H &quot;X-Api-Key: e73e3672427ecd8cd9a6487f7e8f4f03&quot; http:\/\/localhost:8080\/v1\/decisions?scope=username&amp;value=korben<\/code><\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u042d\u0442\u043e<\/p>\n<p>  <b>\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c (getDecisionsStream)<\/b><\/p>\n<p>  \u041f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0430\u0447\u0435, \u043f\u0440\u043e\u0449\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0443 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0431\u0430\u0443\u043d\u0441\u0435\u0440 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435, \u0432\u044b\u0437\u0432\u0430\u0432 API \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c ?Startup \u00abtrue\u00bb, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <code>curl -s -H &quot;X-Api-Key: e73e3672427ecd8cd9a6487f7e8f4f03&quot; http:\/\/localhost:8080\/v1\/decisions\/stream?startup=true<\/code><\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 ?startup \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00abfalse\u00bb \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430.<\/p>\n<pre><code class=\"xml\">{   &quot;deleted&quot;: null,   &quot;new&quot;: [     {       &quot;duration&quot;: &quot;3h59m57.641708614s&quot;,       &quot;id&quot;: 2410,       &quot;origin&quot;: &quot;cscli&quot;,       &quot;scenario&quot;: &quot;manual 'ban' from '939972095cf1459c8b22cc608eff85daEb4yoi2wiTD7Y3fA'&quot;,       &quot;scope&quot;: &quot;Ip&quot;,       &quot;type&quot;: &quot;ban&quot;,       &quot;value&quot;: &quot;3.3.3.4&quot;     }   ] } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e, \u0432 \u043e\u0442\u0432\u0435\u0442 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u00abnull\u00bb:<\/p>\n<pre><code class=\"xml\"> {   &quot;deleted&quot;: null,   &quot;new&quot;: null } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 API \u0447\u0435\u0440\u0435\u0437 Watcher (cscli \u0438\u043b\u0438 \u0430\u0433\u0435\u043d\u0442 CrowdSec)<\/h3>\n<p>  \u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0438, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c API \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 API (POST\/DELETE) \u0438\u043b\u0438 (GET) \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0430\u0433\u0435\u043d\u0442 CrowdSec, \u043d\u043e \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mh\/mt\/kb\/mhmtkbrai-yswozlddti6tz3ilu.png\"><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e IP, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <code>curl -X DELETE &quot;https:\/\/localhost:8080\/v1\/decisions?ip=98.65.32.47&quot; -H &quot;accept: application\/json&quot;<br \/>  <\/code><br \/>  \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043e\u0442\u0432\u0435\u0442 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0438\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0431\u044b\u043b\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043e.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438, <a href=\"https:\/\/github.com\/crowdsecurity\/crowdsec\/tree\/master\/pkg\/apiclient?source=korben.info\">\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 CrowdSec \u043d\u0430 Github \u0435\u0441\u0442\u044c \u043a\u043e\u0434<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Go, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/92\/iz\/2-\/92iz2-d_tcmxzuovjiabwrg8120.png\"><\/p>\n<p>  <a href=\"https:\/\/crowdsecurity.github.io\/api_doc\/index.html?urls.primaryName=LAPI&amp;source=korben.info#\/watchers\/pushAlerts\">\u0412\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0437\u0434\u0435\u0441\u044c.<\/a><\/p>\n<h3>\u0418\u0442\u043e\u0433\u043e<\/h3>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API CrowdSec \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b \u043d\u0430 Go \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c\u044b \u043a \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c. \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/hub.crowdsec.net\/author\/crowdsecurity\/bouncers\/cs-custom-bouncer\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0442<\/a>. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Nginx, WordPress, HAProxy, iptables, nftables \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u044d\u043a\u0440\u0430\u043d\u0430\u043c\u0438 Amazon (AWS) \u0438 Google (Network FW \u0438 Cloud Armor). \u0418\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/crowdsecurity\">\u043d\u0430\u0439\u0442\u0438 \u043d\u0430 Github<\/a>. \u0415\u0449\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u044b <a href=\"https:\/\/github.com\/crowdsecurity\/lua-cs-bouncer\">\u043d\u0430 LUA<\/a> \u0438 <a href=\"https:\/\/github.com\/crowdsecurity\/php-cs-bouncer\">PHP<\/a>.<\/p>\n<p>  \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0432\u0441\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0438 \u0435\u0449\u0435 \u043d\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043c\u0430\u043d\u0443\u0430\u043b\u044b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/crowdsec.net\/\">\u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 CrowdSec<\/a>.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/crowdsec\/blog\/558428\/\"> https:\/\/habr.com\/ru\/company\/crowdsec\/blog\/558428\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430\u0448\u0438 \u043f\u043e\u0441\u0442\u044b, \u0442\u043e \u0441\u043a\u0430\u0436\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435. CrowdSec \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043d-\u043b\u0438\u0441\u0442\u043e\u0432, \u043f\u0440\u0438\u0447\u0435\u043c \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u0438 \u043e\u0431\u0449\u0438\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 CrowdSec \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445. <\/p>\n<p>  \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 CrowdSec 1.x \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b.<br \/>  \u0427\u0442\u043e \u043e\u043d \u0443\u043c\u0435\u0435\u0442?<\/p>\n<p>  \u041d\u0430\u0448 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0435\u0440\u0435\u0433\u0443\u0442 \u043f\u043e\u043a\u043e\u0439 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u044b. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 API \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0443\u0447\u0435\u0442 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0437\u0430 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438. <\/p>\n<p>  \u0427\u0442\u043e \u0437\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f? \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 \u0438\u043b\u0438 \u0446\u0435\u043b\u043e\u043c\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0435\u0441\u043b\u0438 \u0430\u0442\u0430\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0443 \u0431\u0430\u0443\u043d\u0441\u0435\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u043b\u044e\u0447 \u043d\u0430\u0448\u0435\u0433\u043e API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 CrowdSec.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-323489","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=323489"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323489\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}