{"id":212,"date":"2021-10-25T11:35:13","date_gmt":"2021-10-25T03:35:13","guid":{"rendered":"http:\/\/itony.ml\/?p=212"},"modified":"2021-10-25T11:35:13","modified_gmt":"2021-10-25T03:35:13","slug":"centos-7%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3%e5%92%8c%e5%85%b3%e9%97%ad%e9%98%b2%e7%81%ab%e5%a2%99","status":"publish","type":"post","link":"https:\/\/itony.cc\/?p=212","title":{"rendered":"CentOS 7\u5f00\u653e\u7aef\u53e3\u548c\u5173\u95ed\u9632\u706b\u5899"},"content":{"rendered":"<div>\n<div>\n<h1>\u5f00\u653e\u7aef\u53e3<\/h1>\n<p>\u6c38\u4e45\u7684\u5f00\u653e\u9700\u8981\u7684\u7aef\u53e3<\/p>\n<div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i class=\"anticon anticon-copy\" aria-label=\"icon: copy\"><\/i><\/button><\/p>\n<pre class=\"line-numbers  language-csharp\"><code class=\"  language-csharp\">sudo firewall<span class=\"token operator\">-<\/span>cmd <span class=\"token operator\">--<\/span>zone<span class=\"token operator\">=<\/span><span class=\"token keyword\">public<\/span> <span class=\"token operator\">--<\/span><span class=\"token keyword\">add<\/span><span class=\"token operator\">-<\/span>port<span class=\"token operator\">=<\/span><span class=\"token number\">3000<\/span><span class=\"token operator\">\/<\/span>tcp <span class=\"token operator\">--<\/span>permanent\r\nsudo firewall<span class=\"token operator\">-<\/span>cmd <span class=\"token operator\">--<\/span>reload\r\n<\/code><\/pre>\n<\/div>\n<p>\u4e4b\u540e\u68c0\u67e5\u65b0\u7684\u9632\u706b\u5899\u89c4\u5219<\/p>\n<div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i class=\"anticon anticon-copy\" aria-label=\"icon: copy\"><\/i><\/button><\/p>\n<pre class=\"line-numbers  language-cpp\"><code class=\"  language-cpp\">firewall<span class=\"token operator\">-<\/span>cmd <span class=\"token operator\">--<\/span>list<span class=\"token operator\">-<\/span>all\r\n<\/code><\/pre>\n<\/div>\n<h1>\u5173\u95ed\u9632\u706b\u5899<\/h1>\n<p>\u7531\u4e8e\u53ea\u662f\u7528\u4e8e\u5f00\u53d1\u73af\u5883\uff0c\u6240\u4ee5\u6253\u7b97\u628a\u9632\u706b\u5899\u5173\u95ed\u6389<\/p>\n<div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i class=\"anticon anticon-copy\" aria-label=\"icon: copy\"><\/i><\/button><\/p>\n<pre class=\"line-numbers  language-cpp\"><code class=\"  language-cpp\"><span class=\"token comment\">\/\/\u4e34\u65f6\u5173\u95ed\u9632\u706b\u5899,\u91cd\u542f\u540e\u4f1a\u91cd\u65b0\u81ea\u52a8\u6253\u5f00<\/span>\r\nsystemctl restart firewalld\r\n<span class=\"token comment\">\/\/\u68c0\u67e5\u9632\u706b\u5899\u72b6\u6001<\/span>\r\nfirewall<span class=\"token operator\">-<\/span>cmd <span class=\"token operator\">--<\/span>state\r\nfirewall<span class=\"token operator\">-<\/span>cmd <span class=\"token operator\">--<\/span>list<span class=\"token operator\">-<\/span>all\r\n<span class=\"token comment\">\/\/Disable firewall<\/span>\r\nsystemctl disable firewalld\r\nsystemctl stop firewalld\r\nsystemctl status firewalld\r\n<span class=\"token comment\">\/\/Enable firewall<\/span>\r\nsystemctl enable firewalld\r\nsystemctl start firewalld\r\nsystemctl status firewalld<\/code><\/pre>\n<\/div>\n<\/div>\n<p>\u4f5c\u8005\uff1aDevid<br \/>\n\u94fe\u63a5\uff1ahttps:\/\/www.jianshu.com\/p\/bad33004bb4f<br \/>\n\u6765\u6e90\uff1a\u7b80\u4e66<br \/>\n\u8457\u4f5c\u6743\u5f52\u4f5c\u8005\u6240\u6709\u3002\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u8054\u7cfb\u4f5c\u8005\u83b7\u5f97\u6388\u6743\uff0c\u975e\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u3002<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u653e\u7aef\u53e3 \u6c38\u4e45\u7684\u5f00\u653e\u9700\u8981\u7684\u7aef\u53e3 sudo firewall-cmd &#8211;zone=public &#8211;add-p [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-212","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=212"}],"version-history":[{"count":1,"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts\/212\/revisions"}],"predecessor-version":[{"id":213,"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts\/212\/revisions\/213"}],"wp:attachment":[{"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}