{"id":295373,"date":"2025-01-04T04:02:07","date_gmt":"2025-01-03T20:02:07","guid":{"rendered":"https:\/\/gulass.cn\/lfwqdkhzkzns.html"},"modified":"2025-01-04T04:02:07","modified_gmt":"2025-01-03T20:02:07","slug":"lfwqdkhzkzns","status":"publish","type":"post","link":"https:\/\/gulass.cn\/lfwqdkhzkzns.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u7aef\u53e3\u53f7\u67e5\u770b\u6307\u5357\uff1a\u4f7f\u7528netstat\u548css\u547d\u4ee4\u5feb\u901f\u638c\u63e1\u7f51\u7edc\u901a\u4fe1\u72b6\u6001"},"content":{"rendered":"

\u5728Linux<\/a>\u670d\u52a1\u5668<\/a>\u4e0a\uff0c\u7f51\u8def\u901a\u8baf\u662f\u901a\u8fc7\u4e0d\u540c\u7684\u7aef\u6807\u8bed\u6765\u8fa8\u8bc6\u7684\u3002\u63a5\u51fa\u6765\u5c31\u8ddf\u5c0f\u7f16\u4e00\u4e0a\u53bb\u4e86\u89e3\u5728Linux<\/a>\u7cfb\u7edf\u4e0a\u600e\u4e48\u67e5\u770b\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

\u4e00\u3001\u4f7f\u7528netstat<\/a>\u547d\u4ee4<\/a><\/p>\n

netstat\u547d\u4ee4\u662fLinux\u7cfb\u7edf\u4e0a\u4e00\u4e2a\u5e38\u7528\u7684\u7f51\u8def\u72b6\u6001\u67e5\u770b\u5de5\u5177\uff0c\u53ef\u4ee5\u62ff\u6765\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u7684\u7f51\u8def\u8054\u63a5\u72b6\u6001\u548c\u7aef\u53e3\u4f7f\u7528\u60c5\u51b5\u3002<\/p>\n

\u6253\u5f00\u7ec8\u7aef\u7a97\u53e3\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

netstat-tuln<\/p>\n

linux\u5e38\u89c1\u7aef\u53e3\u53f7_linux\u5e38\u7528\u7aef\u53e3\u5217\u8868_linux\u7aef\u53e3\u7684\u4f5c\u7528<\/p>\n

\u8be5\u547d\u4ee4\u5c06\u663e\u793a\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u548c\u5b83\u4eec\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

\u5047\u5982\u987b\u8981\u67e5\u770b\u67d0\u4e2a\u7279\u5b9a\u7aef\u53e3\u7684\u8be6\u5c3d\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

cssnetstat-tuln|grep<\/p>\n

\u5c06\u66ff\u6362\u4e3a\u8981\u67e5\u627e\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

linux\u670d\u52a1\u5668\u7aef\u53e3\u53f7<\/p>\n

\u4e8c\u3001\u4f7f\u7528ss\u547d\u4ee4<\/p>\n

ss\u662fnetstat\u7684\u4ee3\u66ff\u5de5\u5177\uff0c\u529f\u80fd\u7c7b\u4f3c\uff0c\u4f46\u901f\u7387\u66f4\u5feb\uff0c\u7531\u4e8e\u5b83\u4f7f\u7528\u66f4\u5c11\u7684\u7cfb\u7edf\u8d44\u6e90\u3002<\/p>\n

\u6253\u5f00\u7ec8\u7aef\u7a97\u53e3\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

ss-tuln<\/p>\n

\u8fd9\u5c06\u663e\u793a\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u548c\u5b83\u4eec\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

\u5047\u5982\u987b\u8981\u67e5\u770b\u67d0\u4e2a\u7279\u5b9a\u7aef\u53e3\u7684\u8be6\u5c3d\u4fe1\u606flinux\u5e38\u89c1\u7aef\u53e3\u53f7<\/strong>\u96e8\u6797\u6728\u98celinux\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

linux\u5e38\u89c1\u7aef\u53e3\u53f7_linux\u7aef\u53e3\u7684\u4f5c\u7528_linux\u5e38\u7528\u7aef\u53e3\u5217\u8868<\/p>\n

cssss-tuln|grep<\/p>\n

\u5c06\u66ff\u6362\u4e3a\u8981\u67e5\u627e\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

\u4e09\u3001\u4f7f\u7528lsof\u547d\u4ee4<\/p>\n

lsof(listopenfiles)\u547d\u4ee4\u53ef\u4ee5\u5217\u4e3e\u5f53\u524d\u6253\u5f00\u7684\u6587\u4ef6\u548c\u7f51\u8def\u8054\u63a5\u3002\u5b83\u53ef\u4ee5\u62ff\u6765\u67e5\u770b\u67d0\u4e2a\u8fdb\u7a0b\u6253\u5f00\u4e86\u4ec0\u4e48\u6587\u4ef6\u548c\u7f51\u8def\u8054\u63a5\uff0c\u5305\u62ec\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

\u6253\u5f00\u7ec8\u7aef\u7a97\u53e3linux \u8bba\u575b\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

csslsof-i:<\/p>\n

linux\u7aef\u53e3\u7684\u4f5c\u7528_linux\u5e38\u89c1\u7aef\u53e3\u53f7_linux\u5e38\u7528\u7aef\u53e3\u5217\u8868<\/p>\n

\u5c06\u66ff\u6362\u4e3a\u8981\u67e5\u627e\u7684\u7aef\u6807\u8bed\u3002\u8fd9\u5c06\u663e\u793a\u6b63\u5728\u4f7f\u7528\u8be5\u7aef\u53e3\u7684\u8fdb\u7a0b\u7684\u8be6\u5c3d\u4fe1\u606f\u3002<\/p>\n

\u5047\u5982\u8981\u67e5\u770b\u67d0\u4e2a\u8fdb\u7a0b\u6253\u5f00\u4e86\u4ec0\u4e48\u7f51\u8def\u8054\u63a5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

csslsof-c|grep-i\"listen\"<\/p>\n

\u5c06\u66ff\u6362\u4e3a\u8981\u67e5\u8be2\u7684\u8fdb\u7a0b\u540d\u3002\u8fd9\u5c06\u663e\u793a\u8be5\u8fdb\u7a0b\u6253\u5f00\u4e86\u4ec0\u4e48\u7f51\u8def\u8054\u63a5\uff0c\u5305\u62ec\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u6807\u8bed\u3002<\/p>\n

\u56db\u3001\u4f7f\u7528nmap\u547d\u4ee4<\/p>\n

linux\u5e38\u89c1\u7aef\u53e3\u53f7_linux\u7aef\u53e3\u7684\u4f5c\u7528_linux\u5e38\u7528\u7aef\u53e3\u5217\u8868<\/p>\n

nmap\u662f\u4e00\u4e2a\u7f51\u8def\u4fa6\u6d4b\u548c\u5b89\u5168\u626b\u63cf\u5de5\u5177linux\u5e38\u89c1\u7aef\u53e3\u53f7<\/strong>\uff0c\u53ef\u4ee5\u62ff\u6765\u626b\u63cf\u6307\u5b9a\u4e3b\u673a\u7684\u5f00\u653e\u7aef\u53e3\u548c\u8fd0\u884c\u7684\u670d\u52a1\u3002\u5b83\u53ef\u4ee5\u62ff\u6765\u67e5\u770b\u67d0\u4e2a\u4e3b\u673a\u4e0a\u5f00\u653e\u7684\u7aef\u53e3\u548c\u5bf9\u5e94\u7684\u5408\u540c\u3002<\/p>\n

\u6253\u5f00\u7ec8\u7aef\u7a97\u53e3\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

mathematicanmap-p<\/p>\n

\u5c06\u66ff\u6362\u4e3a\u8981\u626b\u63cf\u7684\u7aef\u53e3\u8303\u56f4\uff0c\u6bd4\u5982\"1-1000\";\u5c06\u66ff\u6362\u4e3a\u8981\u626b\u63cf\u7684\u4e3b\u673a\u540d\u6216IP\u5730\u5740\u3002\u8fd0\u884c\u8be5\u547d\u4ee4\u540e\uff0c\u5c06\u663e\u793a\u6307\u5b9a\u4e3b\u673a\u4e0a\u5f00\u653e\u7684\u7aef\u53e3\u548c\u5bf9\u5e94\u7684\u5408\u540c\u3002<\/p>\n

\u8fd9\u79cd\u662f\u5728Linux\u670d\u52a1\u5668\u4e0a\u67e5\u770b\u7aef\u6807\u8bed\u7684\u5e38\u7528\u6280\u5de7\u3002\u4f9d\u7167\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u9002\u5b9c\u7684\u65b9\u5f0f\u6765\u67e5\u770b\u987b\u8981\u7684\u7aef\u53e3\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Linux\u670d\u52a1\u5668\u4e0a\uff0c\u7f51\u7edc\u901a\u4fe1\u662f\u901a\u8fc7\u4e0d\u540c\u7684\u7aef\u53e3\u53f7\u6765\u8bc6\u522b\u7684\u3002\u63a5\u4e0b\u6765\u5c31\u8ddf\u5c0f\u7f16\u4e00\u8d77\u6765\u4e86\u89e3\u5728Linux\u7cfb\u7edf\u4e0a\u5982\u4f55\u67e5\u770b\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u67e5\u770b\u67d0\u4e2a\u8fdb\u7a0b\u6253\u5f00\u4e86\u54ea\u4e9b\u6587\u4ef6\u548c\u7f51\u7edc\u8fde\u63a5\uff0c\u5305\u62ec\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u3002\u8fd9\u5c06\u663e\u793a\u8be5\u8fdb\u7a0b\u6253\u5f00\u4e86\u54ea\u4e9b\u7f51\u7edc\u8fde\u63a5\uff0c\u5305\u62ec\u6b63\u5728\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u3002\u8fd9\u4e9b\u662f\u5728Linux\u670d\u52a1\u5668\u4e0a\u67e5\u770b\u7aef\u53e3\u53f7\u7684\u5e38\u7528\u65b9\u6cd5\u3002<\/p>\n","protected":false},"author":1,"featured_media":295374,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[109,3408,347,1452,1151],"class_list":["post-295373","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-linux","tag-netstat","tag-347","tag-ss","tag-dkh"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/295373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=295373"}],"version-history":[{"count":0,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/295373\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/295374"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=295373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=295373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=295373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}