{"id":27461,"date":"2023-11-16T11:17:31","date_gmt":"2022-11-25T16:03:26","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/"},"modified":"2025-08-12T02:50:37","modified_gmt":"2025-08-11T18:50:37","slug":"%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/","title":{"rendered":"\u6240\u6709Ubuntu\u7684\u7aef\u53e3"},"content":{"rendered":"<p>\u7531\u4e8e\u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u53d1\u8868\uff0c\u6240\u4ee5\u53ef\u80fd\u4f1a\u6709\u4e00\u4e9b\u9519\u8bef\u4e4b\u5904\u3002\u5982\u679c\u6709\u4efb\u4f55\u9519\u8bef\uff0c\u8bf7\u7559\u8a00\u544a\u8bc9\u6211\u3002<\/p>\n<h2>\u5f53\u524d\u7684\u6e2f\u53e3\u60c5\u51b5 (Current port situation)<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw status\r\n<\/code><\/pre>\n<h2>\u91cd\u65b0\u52a0\u8f7d\u8bbe\u7f6e<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw reload\r\n<\/code><\/pre>\n<h2>\u5f00\u653e\u7aef\u53e3<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw allow [\u30dd\u30fc\u30c8\u756a\u53f7]\r\n<\/code><\/pre>\n<h2>\u5173\u95ed\u6e2f\u53e3<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw deny [\u30dd\u30fc\u30c8\u756a\u53f7]\r\n<\/code><\/pre>\n<h2>\u6253\u5f00\u6240\u6709\u7684\u7aef\u53e3<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw default ALLOW\r\n<\/code><\/pre>\n<h2>\u5173\u95ed\u6240\u6709\u7aef\u53e3\u3002<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw default DENY\r\n<\/code><\/pre>\n<h2>\u6240\u6709\u7684\u89c4\u5219\u7f16\u53f7\u5c55\u793a<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw status numbered\r\n<\/code><\/pre>\n<h2>\u5220\u9664\u89c4\u5219<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw delete [\u30eb\u30fc\u30eb\u756a\u53f7]\r\n<\/code><\/pre>\n<h2>\u5728\u7cfb\u7edf\u4e2d\u542f\u7528\u9632\u706b\u5899\u5417\uff1f<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw enable\r\n<\/code><\/pre>\n<h2>\u60a8\u662f\u5426\u8981\u5728\u7cfb\u7edf\u4e2d\u7981\u7528\u9632\u706b\u5899\uff1f<\/h2>\n<pre class=\"post-pre\"><code>$ sudo ufw disable\r\n<\/code><\/pre>\n<h2>\u30dd\u30fc\u30c8\u4e00\u89a7<\/h2>\n<div>\n<div class=\"post-table\">\u57fa\u672c\u7684\u306a\u4f7f\u7528\u30dd\u30fc\u30c8\u30dd\u30fc\u30c8\u756a\u53f7ftp20,21ssh22http80https443<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u53d1\u8868\uff0c\u6240\u4ee5\u53ef\u80fd\u4f1a\u6709\u4e00\u4e9b\u9519\u8bef\u4e4b\u5904\u3002\u5982\u679c\u6709\u4efb\u4f55\u9519\u8bef\uff0c\u8bf7\u7559\u8a00\u544a\u8bc9\u6211\u3002 \u5f53\u524d\u7684\u6e2f\u53e3\u60c5\u51b5 (Curren [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-27461","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6240\u6709Ubuntu\u7684\u7aef\u53e3 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u6240\u6709Ubuntu\u7684\u7aef\u53e3\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6240\u6709ubuntu\u7684\u7aef\u53e3-4\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6240\u6709Ubuntu\u7684\u7aef\u53e3\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u6240\u6709Ubuntu\u7684\u7aef\u53e3\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6240\u6709ubuntu\u7684\u7aef\u53e3-4\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-25T16:03:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T18:50:37+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/\",\"name\":\"\u6240\u6709Ubuntu\u7684\u7aef\u53e3 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-11-25T16:03:26+00:00\",\"dateModified\":\"2025-08-11T18:50:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"description\":\"\u5173\u4e8e\u6240\u6709Ubuntu\u7684\u7aef\u53e3\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6240\u6709Ubuntu\u7684\u7aef\u53e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6240\u6709Ubuntu\u7684\u7aef\u53e3 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u6240\u6709Ubuntu\u7684\u7aef\u53e3\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u6240\u6709ubuntu\u7684\u7aef\u53e3-4\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6240\u6709Ubuntu\u7684\u7aef\u53e3","og_description":"\u5173\u4e8e\u6240\u6709Ubuntu\u7684\u7aef\u53e3\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6240\u6709ubuntu\u7684\u7aef\u53e3-4\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-11-25T16:03:26+00:00","article_modified_time":"2025-08-11T18:50:37+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/","name":"\u6240\u6709Ubuntu\u7684\u7aef\u53e3 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-11-25T16:03:26+00:00","dateModified":"2025-08-11T18:50:37+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"description":"\u5173\u4e8e\u6240\u6709Ubuntu\u7684\u7aef\u53e3\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6240\u6709Ubuntu\u7684\u7aef\u53e3"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%89%80%e6%9c%89ubuntu%e7%9a%84%e7%ab%af%e5%8f%a3-4\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=27461"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27461\/revisions"}],"predecessor-version":[{"id":97469,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27461\/revisions\/97469"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=27461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=27461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=27461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}