{"id":434,"date":"2021-09-10T08:56:19","date_gmt":"2021-09-10T08:56:19","guid":{"rendered":"https:\/\/262235.xyz\/?p=434"},"modified":"2021-09-10T08:56:19","modified_gmt":"2021-09-10T08:56:19","slug":"434","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/09\/10\/434\/","title":{"rendered":"\u4e2a\u4eba\u535a\u5ba2\u88ab\u6253\u4e86\u4e2a\u5bc2\u5bde&#8211;\u963f\u91cc\u4e91\u5230\u7f8e\u897f\u53ea\u6709250KB\/s"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/09\/1370032143.png\" alt=\"QQ\u56fe\u724720210910145006.png\" title=\"QQ\u56fe\u724720210910145006.png\"><\/p>\n<h3>\u4e2a\u4eba\u535a\u5ba2\u7f51\u9875\u662f\u4f7f\u7528 <code>Docker<\/code> \u5bb9\u5668\u90e8\u7f72\u7684<\/h3>\n<ul>\n<li>\n<p>\u9650\u5236\u4e86 CPU \u5cf0\u503c 0.8\uff0c\u81ea\u52a8\u91cd\u542f<\/p>\n<pre><code>docker run -d -p 80:80 -p 443:443  \\r\n  --cpus 0.8   --restart=always   \\r\n  -v \/var\/www\/html:\/var\/www\/html   \\r\n  --name  nginx-php      \\r\n  hongwenjun\/nginx-php\n<\/code><\/pre>\n<h3><code>Dockerfile<\/code> \u91cc\u628a <code>Nginx<\/code> \u65e5\u5fd7 \u91cd\u5b9a\u5411\u5230 <code>Docker<\/code> \u5bb9\u5668\u7684\u6807\u51c6\u8f93\u51fa\u548c\u6807\u51c6\u9519\u8bef<\/h3>\n<pre><code>ln -sf \/dev\/stdout \/var\/log\/nginx\/access.log\nln -sf \/dev\/stderr \/var\/log\/nginx\/error.log<\/code><\/pre>\n<h3>\u6240\u4ee5 Docker \u65e5\u5fd7\u6587\u4ef6\u6709 1.89G\uff0c \u4f7f\u7528 <code>Docker logs<\/code> \u8f93\u51fa\u5230 <code>&gt;logs.txt<\/code> \u4e5f\u6709 <code>688 MB<\/code>\uff0c\u5e94\u8be5\u9519\u8bef\u6ca1\u6709\u5bfc\u51fa\u3002<\/h3>\n<pre><code>-rw-r----- 1 root root 18890058465 Sep 10 03:17 050642c42c1fefb48339ebe38a4ea968b86ffd840faa6dc37e66f341b85044ac-json.log<\/code><\/pre>\n<h3>\u4f7f\u7528\u547d\u4ee4 \u505a\u4e86\u4e2a IP \u6392\u540d\u7edf\u8ba1,\u524d 10 IP \u5982\u4e0a\u56fe<\/h3>\n<pre><code>cat logs.txt | grep -oE '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | sort | uniq -c| sort -nrk 1 &gt; a.txt<\/code><\/pre>\n<h3>\u611f\u89c9\u8fd9\u4e24\u4e2aIP\u662f \u64cd\u63a7\u811a\u672c\u673a\u5668: 107.148.161.243 @\u7f8e\u56fd\u52a0\u5229\u798f\u5c3c\u4e9a\u5dde\u6d1b\u6749\u77f6  \u548c 180.188.16.116 @\u4e2d\u56fd\u6d59\u6c5f\u53f0\u5dde<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/09\/3424996225.png\" alt=\"IP.png\" title=\"IP.png\"><\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u51e0\u4e2aIP \u624d\u662f DDOS\u653b\u51fb\u88ab\u64cd\u63a7\u673a\u5668<br \/>104.243.33.251 @\u7f8e\u56fd\u65b0\u6cfd\u897f\u5dde\u76ae\u65af\u5361\u7279\u7ef4choopa.com<br \/>104.194.10.31 @\u7f8e\u56fd\u5185\u534e\u8fbe\u5dde\u62c9\u65af\u7ef4\u52a0\u65af<br \/>104.194.10.31 @\u7f8e\u56fd\u5185\u534e\u8fbe\u5dde\u62c9\u65af\u7ef4\u52a0\u65af<br \/>45.58.113.58  @\u7f8e\u56fd\u7f8e\u56fd<\/p>\n<h3>\u67e5\u770b\u963f\u91cc\u4e91\u63a7\u5236\u53f0\u6d41\u91cf\u4f7f\u7528\uff0c\u963f\u91cc\u4e91\u5230\u7f8e\u897f\u5cf0\u503c\u53ea\u6709250KB\/s\uff0cDDOS\u4e86\u5bc2\u5bde<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/09\/2331572776.png\" alt=\"21.png\" title=\"21.png\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/09\/1502849520.png\" alt=\"22.png\" title=\"22.png\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e2a\u4eba\u535a\u5ba2\u7f51\u9875\u662f\u4f7f\u7528 Docker \u5bb9\u5668\u90e8\u7f72\u7684 \u9650\u5236\u4e86 CPU \u5cf0\u503c 0.8\uff0c\u81ea\u52a8\u91cd\u542f docker  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6],"tags":[],"class_list":["post-434","post","type-post","status-publish","format-standard","hentry","category-docker","category-vps"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/434\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}