{"id":233,"date":"2024-03-10T00:58:41","date_gmt":"2024-03-09T16:58:41","guid":{"rendered":"https:\/\/669082.xyz\/?p=233"},"modified":"2024-03-10T01:00:17","modified_gmt":"2024-03-09T17:00:17","slug":"centos-firewall%e8%ae%be%e7%bd%ae%e4%bb%85%e5%85%81%e8%ae%b8%e6%8c%87%e5%ae%9aip%e8%ae%bf%e9%97%ae%e7%bd%91%e7%ab%99_%e4%b8%80%e8%88%ac%e7%94%a8%e4%ba%8e%e7%a7%81%e6%9c%89%e7%bd%91%e7%ab%99","status":"publish","type":"post","link":"https:\/\/669082.xyz\/index.php\/2024\/03\/10\/centos-firewall%e8%ae%be%e7%bd%ae%e4%bb%85%e5%85%81%e8%ae%b8%e6%8c%87%e5%ae%9aip%e8%ae%bf%e9%97%ae%e7%bd%91%e7%ab%99_%e4%b8%80%e8%88%ac%e7%94%a8%e4%ba%8e%e7%a7%81%e6%9c%89%e7%bd%91%e7%ab%99\/","title":{"rendered":"centos firewall\u8bbe\u7f6e\u4ec5\u5141\u8bb8\u6307\u5b9aIP\u8bbf\u95ee\u7f51\u7ad9_\u4e00\u822c\u7528\u4e8e\u79c1\u6709\u7f51\u7ad9"},"content":{"rendered":"<h4>\u6ce8\u610f \u6b64\u8bbe\u7f6e\u662f\u6839\u636e\u670d\u52a1\u5668\u7aef\u53e3\u8fdb\u884c\u7684 \u5bf9\u6574\u53f0\u670d\u52a1\u5668\u6709\u6548<\/h4>\n<h5>\u4f8b\u5982\uff1a\u7f51\u7ad9\u7aef\u53e3\u4e3a443<\/h5>\n<pre><code class=\"language-shell\">#\u67e5\u8be2\u6253\u5f00\u7684\u7aef\u53e3\nfirewall-cmd --zone=public --list-ports\n\n#\u5173\u95ed\u7aef\u53e3\uff0c\u5982\u679c\u7aef\u53e3\u672a\u5f00\u542f\u5219\u65e0\u9700\u5173\u95ed\u3002\n#\u5173\u95ed\u7aef\u53e3443\nfirewall-cmd --zone=public --remove-port=443\/tcp --permanent\n\n#\u91cd\u65b0\u8f7d\u5165\u4e00\u4e0b\u9632\u706b\u5899\u8bbe\u7f6e\uff0c\u4f7f\u8bbe\u7f6e\u751f\u6548\nfirewall-cmd --reload\n\n#\u67e5\u8be2\u6253\u5f00\u7684\u7aef\u53e3\nfirewall-cmd --zone=public --list-ports\n\n#\u5141\u8bb8ip192.168.1.1\u8bbf\u95ee443\u7aef\u53e3\nfirewall-cmd --permanent --add-rich-rule=&quot;rule family=&quot;ipv4&quot; source address=&quot;192.168.1.1&quot; port protocol=&quot;tcp&quot; port=&quot;443&quot; accept&quot;\n\n#\u91cd\u65b0\u8f7d\u5165\u4e00\u4e0b\u9632\u706b\u5899\u8bbe\u7f6e\uff0c\u4f7f\u8bbe\u7f6e\u751f\u6548\nfirewall-cmd --reload\n\n#\u67e5\u770b\u5df2\u8bbe\u7f6e\u89c4\u5219\nfirewall-cmd --zone=public --list-rich-rules<\/code><\/pre>\n<h5>\u53c2\u8003\u8d44\u6599 <a href=\"https:\/\/www.cnblogs.com\/liuqq1015\/p\/17078159.html\">https:\/\/www.cnblogs.com\/liuqq1015\/p\/17078159.html<\/a><\/h5>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f \u6b64\u8bbe\u7f6e\u662f\u6839\u636e\u670d\u52a1\u5668\u7aef\u53e3\u8fdb\u884c\u7684 \u5bf9\u6574\u53f0\u670d\u52a1\u5668\u6709\u6548 \u4f8b\u5982\uff1a\u7f51\u7ad9\u7aef\u53e3\u4e3a443 #\u67e5\u8be2\u6253\u5f00\u7684\u7aef\u53e3 fi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":3,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":236,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions\/236"}],"wp:attachment":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}