{"id":42160,"date":"2023-10-04T10:38:12","date_gmt":"2023-10-04T02:38:12","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=42160"},"modified":"2023-10-04T10:38:12","modified_gmt":"2023-10-04T02:38:12","slug":"nmlzwwlztdzjgj","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/42160.html","title":{"rendered":"netstat\u547d\u4ee4\uff1a\u638c\u63e1\u7f51\u7edc\u72b6\u6001\u7684\u6700\u4f73\u5de5\u5177"},"content":{"rendered":"
netstat\u547d\u4ee4\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7f51\u7edc\u68c0\u6d4b\u548c\u5206\u6790\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u4e86\u89e3\u8ba1\u7b97\u673a\u7f51\u7edc\u7684\u72b6\u6001\u3002\u672c\u6587\u5c06\u4ecb\u7ecdnetstat\u547d\u4ee4\u7684\u57fa\u672c\u7528\u6cd5\u4ee5\u53ca\u5b83\u7684\u5404\u79cd\u529f\u80fd\uff0c\u5e76\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528netstat\u547d\u4ee4\u6765\u68c0\u6d4b\u548c\u5206\u6790\u7f51\u7edc\u72b6\u6001\u3002<\/p>\n
netstat\u547d\u4ee4\u6709\u5f88\u591a\u53c2\u6570\uff0c\u53ef\u4ee5\u7528\u6765\u67e5\u770b\u7f51\u7edc\u8fde\u63a5\u72b6\u6001\u3001\u8def\u7531\u8868\u3001\u63a5\u53e3\u72b6\u6001\u3001\u7f51\u7edc\u7edf\u8ba1\u4fe1\u606f\u7b49\u3002netstat\u547d\u4ee4\u7684\u57fa\u672c\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n
netstat\u547d\u4ee4\u7684\u5e38\u7528\u9009\u9879\u6709\uff1a<\/p>\n netstat\u547d\u4ee4\u53ef\u4ee5\u7528\u6765\u68c0\u67e5\u6307\u5b9a\u7684\u7aef\u53e3\u662f\u5426\u88ab\u5360\u7528\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n \u5982\u679c\u6307\u5b9a\u7684\u7aef\u53e3\u88ab\u5360\u7528\uff0c\u5219\u4f1a\u663e\u793a\u76f8\u5173\u7684\u4fe1\u606f\uff1b\u5982\u679c\u6307\u5b9a\u7aef\u53e3\u6ca1\u6709\u88ab\u5360\u7528\uff0c\u5219\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u4fe1\u606f\u3002<\/p>\n netstat\u547d\u4ee4\u53ef\u4ee5\u7528\u6765\u67e5\u770b\u7f51\u7edc\u8fde\u63a5\u72b6\u6001\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n \u8fd9\u6761\u547d\u4ee4\u4f1a\u663e\u793a\u6240\u6709\u7684\u7f51\u7edc\u8fde\u63a5\u72b6\u6001\uff0c\u5305\u62ecTCP\u548cUDP\u8fde\u63a5\uff0c\u4ee5\u53ca\u672c\u5730\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff0c\u8fdc\u7a0b\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff0c\u8fde\u63a5\u72b6\u6001\u7b49\u3002<\/p>\n netstat\u547d\u4ee4\u53ef\u4ee5\u7528\u6765\u67e5\u770b\u8def\u7531\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n \u8fd9\u6761\u547d\u4ee4\u4f1a\u663e\u793a\u8def\u7531\u8868\uff0c\u5305\u62ec\u76ee\u6807\u5730\u5740\u3001\u7f51\u5173\u5730\u5740\u3001\u63a9\u7801\u3001\u6807\u5fd7\u7b49\u4fe1\u606f\u3002<\/p>\n netstat\u547d\u4ee4\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u7f51\u7edc\u68c0\u6d4b\u548c\u5206\u6790\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u4e86\u89e3\u8ba1\u7b97\u673a\u7f51\u7edc\u7684\u72b6\u6001\u3002<\/strong>\u672c\u6587\u4ecb\u7ecd\u4e86netstat\u547d\u4ee4\u7684\u57fa\u672c\u7528\u6cd5\u548c\u5176\u4ed6\u529f\u80fd\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528netstat\u547d\u4ee4\u6765\u68c0\u6d4b\u548c\u5206\u6790\u7f51\u7edc\u72b6\u6001\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" netstat\u547d\u4ee4\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7f51\u7edc\u68c0\u6d4b\u548c\u5206\u6790\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u4e86\u89e3\u8ba1\u7b97\u673a\u7f51\u7edc\u7684\u72b6\u6001\u3002\u672c\u6587\u5c06\u4ecb\u7ecdnetstat\u547d\u4ee4\u7684\u57fa\u672c\u7528\u6cd5\u4ee5\u53ca\u5b83\u7684\u5404\u79cd\u529f\u80fd\uff0c\u5e76\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528nets<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-42160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/42160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=42160"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/42160\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=42160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=42160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=42160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}netstat [\u9009\u9879] [\u53c2\u6570]<\/code><\/p>\n
\n
-a<\/code>\uff1a\u663e\u793a\u6240\u6709\u8fde\u63a5\u548c\u4fa6\u542c\u7aef\u53e3<\/li>\n
-e<\/code>\uff1a\u663e\u793a\u4ee5\u592a\u7f51\u7edf\u8ba1\u4fe1\u606f<\/li>\n
-n<\/code>\uff1a\u4ee5\u6570\u5b57\u5f62\u5f0f\u663e\u793a\u5730\u5740\u548c\u7aef\u53e3\u53f7<\/li>\n
-p<\/code>\uff1a\u663e\u793a\u6307\u5b9a\u7a0b\u5e8f\u6216\u670d\u52a1\u7684\u8fde\u63a5<\/li>\n
-r<\/code>\uff1a\u663e\u793a\u8def\u7531\u8868<\/li>\n
-s<\/code>\uff1a\u663e\u793a\u6bcf\u4e2a\u534f\u8bae\u7684\u7edf\u8ba1\u4fe1\u606f<\/li>\n<\/ul>\n
netstat\u547d\u4ee4\u7684\u5176\u4ed6\u529f\u80fd<\/h2>\n
\u68c0\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5360\u7528<\/h3>\n
netstat -an | find \":\u7aef\u53e3\u53f7\"<\/code><\/p>\n
\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u72b6\u6001<\/h3>\n
netstat -an<\/code><\/p>\n
\u68c0\u67e5\u8def\u7531\u8868<\/h3>\n
netstat -r<\/code><\/p>\n
\u603b\u7ed3<\/h2>\n