\u8fd9\u4e2a\u5e38\u7528\u7ec4\u5408\u7b80\u5199\u7248\u672c\u662f -tulpn \u3002<\/p>\n
\u8981\u663e\u793a\u4e00\u4e2a\u6307\u5b9a\u670d\u52a1\u7684\u4fe1\u606f\uff0c\u4f7f\u7528 grep \u547d\u4ee4\u8fc7\u6ee4\uff1a<\/p>\n
$ sudo netstat -anlp | grep cups\r\n tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1721\/cupsd tcp6 0 0 ::1:631 :::* LISTEN 1721\/cupsd\r\n unix 2 [ ACC ] STREAM LISTENING 27251 1\/systemd \/var\/run\/cups\/cups.sock\r\n unix 2 [ ] DGRAM 59530 1721\/cupsd\r\n unix 3 [ ] STREAM CONNECTED 55196 1721\/cupsd \/var\/run\/cups\/cups.sock\r\n<\/pre>\n\u63a5\u4e0b\u6765\u7684\u6b65\u9aa4
\n\u4e00\u65e6\u4f60\u8fd0\u884c\u4e86 netstat \u547d\u4ee4\uff0c\u4f60\u5c31\u53ef\u4ee5\u91c7\u53d6\u63aa\u65bd\u6765\u4fdd\u62a4\u4f60\u7684\u7cfb\u7edf\uff0c\u786e\u4fdd\u53ea\u6709\u4f60\u4e3b\u52a8\u4f7f\u7528\u7684\u670d\u52a1\u5728\u4f60\u7684\u7f51\u7edc\u4e0a\u88ab\u76d1\u542c\u3002<\/p>\n
\u8bc6\u522b\u901a\u5e38\u88ab\u5229\u7528\u7684\u7aef\u53e3\u548c\u670d\u52a1\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u5173\u95ed\u4f60\u5b9e\u9645\u4e0d\u4f7f\u7528\u7684\u7aef\u53e3\u3002
\n\u7559\u610f\u4e0d\u5e38\u89c1\u7684\u7aef\u53e3\u53f7\uff0c\u8ba4\u8bc6\u4e86\u89e3\u5728\u4f60\u7cfb\u7edf\u4e0a\u4f7f\u7528\u7684\u5408\u6cd5\u7aef\u53e3\u3002
\n\u5bc6\u5207\u6ce8\u610f SELinux \u9519\u8bef\u3002\u6709\u65f6\u4f60\u9700\u8981\u505a\u7684\u53ea\u662f\u66f4\u65b0\u4e0a\u4e0b\u6587\uff0c\u4ee5\u5339\u914d\u4f60\u5bf9\u7cfb\u7edf\u505a\u7684\u5408\u6cd5\u66f4\u6539\uff0c\u4f46\u662f\u8981\u9605\u8bfb\u9519\u8bef\u8b66\u544a\uff0c\u4ee5\u786e\u4fdd SELinux \u63d0\u9192\u4f60\u7684\u4e0d\u662f\u53ef\u7591\u6216\u8005\u6076\u610f\u7684\u6d3b\u52a8\u3002
\n\u5982\u679c\u4f60\u53d1\u73b0\u4e00\u4e2a\u7aef\u53e3\u6b63\u5728\u8fd0\u884c\u4e00\u4e2a\u53ef\u7591\u7684\u670d\u52a1\uff0c\u6216\u8005\u4f60\u53ea\u662f\u7b80\u5355\u7684\u60f3\u8981\u5173\u95ed\u4f60\u4e0d\u518d\u4f7f\u7528\u7684\u7aef\u53e3\uff0c\u4f60\u53ef\u4ee5\u9075\u4ece\u4ee5\u4e0b\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u901a\u8fc7\u9632\u706b\u5899\u89c4\u5219\u624b\u52a8\u62d2\u7edd\u7aef\u53e3\u8bbf\u95ee\uff1a<\/p>\n
\u5982\u679c\u4f60\u5728\u4f7f\u7528 firewall-cmd \uff0c\u8fd0\u884c\u8fd9\u4e9b\u547d\u4ee4\uff1a<\/p>\n
$ sudo firewall-cmd \u2013remove-port=<port number>\/tcp\r\n $ sudo firewall-cmd \u2013runtime-to-permanent\r\n<\/pre>\n\u5982\u679c\u4f60\u5728\u4f7f\u7528 UFW\uff0c\u8fd0\u884c\u4ee5\u4e0b\u7684\u547d\u4ee4\uff1a<\/p>\n
$ sudo ufw deny \r\n<\/pre>\n\u4e0b\u4e00\u6b65\uff0c\u4f7f\u7528 systemctl \u6765\u505c\u6b62\u8fd9\u4e2a\u670d\u52a1\uff1a<\/p>\n
$ systemctl stop\r\n<\/pre>\n\u7406\u89e3 netstat<\/strong><\/span><\/div>\nnetstat \u662f\u4e00\u4e2a\u5feb\u901f\u6536\u96c6\u4f60\u7684\u670d\u52a1\u5668\u7f51\u7edc\u8fde\u63a5\u4fe1\u606f\u7684\u6709\u7528\u5de5\u5177\u3002\u5b9a\u671f\u7f51\u7edc\u76d1\u6d4b\u662f\u4e86\u89e3\u4f60\u7684\u7cfb\u7edf\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\uff0c\u5bf9\u5e2e\u52a9\u4f60\u4fdd\u6301\u4f60\u7684\u7cfb\u7edf\u5b89\u5168\u6709\u7740\u91cd\u8981\u610f\u4e49\u3002\u5c06\u8fd9\u4e00\u6b65\u7eb3\u5165\u4f60\u7684\u65e5\u5e38\u7ba1\u7406\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c netstat \u6216\u8005 ss \uff0c\u4ee5\u53ca Nmap \u7b49\u5f00\u6e90\u7aef\u53e3\u626b\u63cf\u5668\u6216\u8005 Wireshark \u7b49\u55c5\u63a2\u5668 \uff0c\u5b83\u4eec\u90fd\u5141\u8bb8\u8bbe\u5b9a \u8ba1\u5212\u4efb\u52a1\u3002<\/p>\n
\u968f\u7740\u670d\u52a1\u5668\u5b58\u50a8\u4e86\u5927\u91cf\u7684\u4e2a\u4eba\u6570\u636e\uff0c\u786e\u4fdd\u4e2a\u4eba\u670d\u52a1\u5668\u7684\u5b89\u5168\u65e5\u76ca\u91cd\u8981\u3002\u901a\u8fc7\u4e86\u89e3\u4f60\u7684\u670d\u52a1\u5668\u600e\u6837\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u4f60\u53ef\u4ee5\u964d\u4f4e\u4f60\u7684\u673a\u5668\u7684\u98ce\u9669\uff0c\u540c\u65f6\u4f60\u4ecd\u53ef\u4ee5\u5728\u6570\u5b57\u65f6\u4ee3\u5927\u91cf\u7684\u8fde\u63a5\u4e2d\u83b7\u5f97\u76ca\u5904\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5728 \u4e4b\u524d\u7684\u6587\u7ae0\u4e2d\uff0c\u6211\u5206\u4eab\u4e86\u4e00\u4e9b\u7ba1\u7406\u4f60\u7684\u4e2a\u4eba Linux \u670d\u52a1\u5668\u7684\u9996\u8981\u6b65\u9aa4\u3002\u6211\u7b80\u8981\u7684\u63d0\u5230\u4e86\u76d1\u6d4b\u7f51\u7edc\u8fde\u63a5\u7684\u76d1\u542c\u7aef\u53e3 […]<\/p>\n","protected":false},"author":643,"featured_media":240642,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-240639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/240639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=240639"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/240639\/revisions"}],"predecessor-version":[{"id":240818,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/240639\/revisions\/240818"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/240642"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=240639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=240639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=240639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}