{"id":8601,"date":"2022-03-18T22:03:09","date_gmt":"2022-03-18T14:03:09","guid":{"rendered":"https:\/\/www.ldhost.cn\/jc\/?p=8601"},"modified":"2022-03-18T22:03:11","modified_gmt":"2022-03-18T14:03:11","slug":"linux-centos%e7%b3%bb%e7%bb%9f%e5%bc%80%e5%90%af%e5%92%8c%e5%85%b3%e9%97%ad%e9%98%b2%e7%81%ab%e5%a2%99%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.ldhost.cn\/jc\/linux\/8601.html","title":{"rendered":"linux centos\u7cfb\u7edf\u5f00\u542f\u548c\u5173\u95ed\u9632\u706b\u5899\u547d\u4ee4"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"435\" height=\"269\" src=\"https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2022\/03\/20191227155848.jpg\" alt=\"\" class=\"wp-image-8602\" srcset=\"https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2022\/03\/20191227155848.jpg 435w, https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2022\/03\/20191227155848-300x186.jpg 300w, https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2022\/03\/20191227155848-150x93.jpg 150w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/figure>\n\n\n\n<p>CentOS:<br>\u9996\u5148\u67e5\u770b\u9632\u706b\u5899\u72b6\u6001\uff1a<br>service iptables status<\/p>\n\n\n\n<p><br>\u6c38\u4e45\u6027\u751f\u6548\uff0c\u91cd\u542f\u540e\u4e0d\u4f1a\u590d\u539f<br>\u5f00\u542f\uff1a<br>chkconfig iptables on<br>\u5173\u95ed\uff1a<br>chkconfig iptables off<\/p>\n\n\n\n<p><br>\u5373\u65f6\u751f\u6548\uff0c\u91cd\u542f\u540e\u590d\u539f<br>\u5f00\u542f\uff1a<br>service iptables start<br>\u5173\u95ed\uff1a<br>service iptables stop<br>\u8bbe\u7f6e\u540e\u91cd\u542f\uff1areboot<\/p>\n\n\n\n<p><br>\u4e34\u65f6\u5173\u95ed\u9632\u706b\u5899<br>systemctl stop firewalld<br>\u6c38\u4e45\u5173\u95ed\u9632\u706b\u5899\u7684\u5f00\u673a\u81ea\u542f\u52a8<br>systemctl disable firewalld<br>\u4e34\u65f6\u6253\u5f00\u9632\u706b\u5899<br>systemctl start firewalld<br>\u9632\u706b\u5899\u5f00\u673a\u542f\u52a8<br>systemctl enable firewalld<br>\u67e5\u770b\u9632\u706b\u5899\u72b6\u6001<\/p>\n\n\n\n<p>CentOS7\u5f00\u542f\u548c\u5173\u95ed\u7aef\u53e3<br>\u5f00\u542f2333\u7aef\u53e3<br>firewall-cmd &#8211;zone=public &#8211;add-port=2333\/tcp &#8211;permanent<br>\u66f4\u65b0\u9632\u706b\u5899\u89c4\u5219\u4f7f\u521a\u521a\u6dfb\u52a0\u76842333\u7aef\u53e3\u751f\u6548<br>firewall-cmd &#8211;reload<br>\u67e5\u770b\u5f00\u653e\u7684\u7aef\u53e3\u5217\u8868<br>firewall-cmd &#8211;list-ports<br>\u5173\u95ed2333\u7aef\u53e3<br>firewall-cmd &#8211;zone=public &#8211;remove-port=2333\/tcp &#8211;permanent<br>\u66f4\u65b0\u9632\u706b\u5899\u89c4\u5219\u4f7f\u7528\u521a\u521a\u5220\u9664\u7684\u7aef\u53e3\u5173\u95ed<br>firewall-cmd &#8211;reload<\/p>\n<div><img decoding=\"async\" src=\"https:\/\/www.ldhost.cn\/images\/ad-845-3.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\" \/><\/div>","protected":false},"excerpt":{"rendered":"<p>CentOS:\u9996\u5148\u67e5\u770b\u9632\u706b\u5899\u72b6\u6001\uff1aservice iptables status \u6c38\u4e45\u6027\u751f\u6548\uff0c\u91cd\u542f\u540e\u4e0d\u4f1a\u590d\u539f\u5f00\u542f\uff1achkconfig iptables on\u5173\u95ed\uff1achkconfig iptables off \u5373\u65f6\u751f\u6548\uff0c\u91cd\u542f\u540e\u590d\u539f\u5f00\u542f\uff1aservice iptables start\u5173\u95ed\uff1aservice iptables stop\u8bbe\u7f6e\u540e\u91cd\u542f\uff1areboot \u4e34\u65f6\u5173\u95ed\u9632\u706b\u5899systemctl stop firewalld\u6c38\u4e45\u5173\u95ed\u9632\u706b\u5899\u7684\u5f00\u673a\u81ea\u542f\u52a8systemctl disable firewalld\u4e34\u65f6\u6253\u5f00\u9632\u706b\u5899systemctl start firewalld\u9632\u706b\u5899\u5f00\u673a\u542f\u52a8systemctl enab&#8230; <a href=\"https:\/\/www.ldhost.cn\/jc\/linux\/8601.html\" class=\"readmore\">\u9605\u8bfb\u5168\u6587<span class=\"screen-reader-text\">linux centos\u7cfb\u7edf\u5f00\u542f\u548c\u5173\u95ed\u9632\u706b\u5899\u547d\u4ee4<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[],"class_list":["post-8601","post","type-post","status-publish","format-standard","hentry","category-linux","content-layout-excerpt-thumb"],"_links":{"self":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/8601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/comments?post=8601"}],"version-history":[{"count":1,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/8601\/revisions"}],"predecessor-version":[{"id":8603,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/8601\/revisions\/8603"}],"wp:attachment":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/media?parent=8601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/categories?post=8601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/tags?post=8601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}