{"id":90,"date":"2021-04-01T16:30:01","date_gmt":"2021-04-01T08:30:01","guid":{"rendered":"http:\/\/www.wayln.com\/?p=90"},"modified":"2021-04-01T16:30:01","modified_gmt":"2021-04-01T08:30:01","slug":"centos-8%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3%e5%b9%b6%e5%af%b9%e5%a4%96%e5%bc%80%e6%94%be","status":"publish","type":"post","link":"https:\/\/www.wayln.com\/?p=90","title":{"rendered":"centos 8\u5f00\u653e\u7aef\u53e3\u5e76\u5bf9\u5916\u5f00\u653e"},"content":{"rendered":"<ol>\n<li>\n<p>\u67e5\u770b\u5df2\u6253\u5f00\u7684\u7aef\u53e3  # netstat -anp<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u60f3\u5f00\u7684\u7aef\u53e3\u662f\u5426\u5df2\u5f00 # firewall-cmd &#8211;query-port=666\/tcp<br \/>\n\u82e5\u6b64\u63d0\u793a FirewallD is not running<br \/>\n\u8868\u793a\u4e3a\u4e0d\u53ef\u77e5\u7684\u9632\u706b\u5899 \u9700\u8981\u67e5\u770b\u72b6\u6001\u5e76\u5f00\u542f\u9632\u706b\u5899<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u9632\u706b\u5899\u72b6\u6001  # systemctl status firewalld<br \/>\nrunning \u72b6\u6001\u5373\u9632\u706b\u5899\u5df2\u7ecf\u5f00\u542f<br \/>\ndead \u72b6\u6001\u5373\u9632\u706b\u5899\u672a\u5f00\u542f<\/p>\n<\/li>\n<li>\n<p>\u5f00\u542f\u9632\u706b\u5899\uff0c# systemctl start firewalld  \u6ca1\u6709\u4efb\u4f55\u63d0\u793a\u5373\u5f00\u542f\u6210\u529f<\/p>\n<\/li>\n<li>\n<p>\u5f00\u542f\u9632\u706b\u5899 # service firewalld start<br \/>\n\u5173\u95ed\u9632\u706b\u5899 # systemctl stop firewalld<br \/>\ncentos7.3 \u4e0a\u8ff0\u65b9\u5f0f\u53ef\u80fd\u65e0\u6cd5\u5f00\u542f\uff0c\u53ef\u4ee5\u5148#systemctl unmask firewalld.service \u7136\u540e # systemctl start firewalld.service<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u60f3\u5f00\u7684\u7aef\u53e3\u662f\u5426\u5df2\u5f00 # firewall-cmd &#8211;query-port=666\/tcp    \u63d0\u793ano\u8868\u793a\u672a\u5f00<\/p>\n<\/li>\n<li>\n<p>\u5f00\u6c38\u4e45\u7aef\u53e3\u53f7 firewall-cmd &#8211;add-port=666\/tcp &#8211;permanent   \u63d0\u793a    success \u8868\u793a\u6210\u529f<\/p>\n<\/li>\n<li>\n<p>\u91cd\u65b0\u8f7d\u5165\u914d\u7f6e  # firewall-cmd &#8211;reload    \u6bd4\u5982\u6dfb\u52a0\u89c4\u5219\u4e4b\u540e\uff0c\u9700\u8981\u6267\u884c\u6b64\u547d\u4ee4<\/p>\n<\/li>\n<li>\n<p>\u518d\u6b21\u67e5\u770b\u60f3\u5f00\u7684\u7aef\u53e3\u662f\u5426\u5df2\u5f00  # firewall-cmd &#8211;query-port=666\/tcp  \u63d0\u793ayes\u8868\u793a\u6210\u529f<\/p>\n<\/li>\n<li>\n<p>\u82e5\u79fb\u9664\u7aef\u53e3 # firewall-cmd &#8211;permanent &#8211;remove-port=666\/tcp<\/p>\n<\/li>\n<li>\n<p>\u4fee\u6539iptables  \u6709\u4e9b\u7248\u672c\u9700\u8981\u5b89\u88c5iptables-services # yum install iptables-services \u7136\u540e\u4fee\u6539\u8fdb\u76ee\u5f55 \/etc\/sysconfig\/iptables   \u4fee\u6539\u5185\u5bb9<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u67e5\u770b\u5df2\u6253\u5f00\u7684\u7aef\u53e3 # netstat -anp \u67e5\u770b\u60f3\u5f00\u7684\u7aef\u53e3\u662f\u5426\u5df2\u5f00 # firewall-cmd &#038;#82 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,10,1],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-1"],"_links":{"self":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90"}],"version-history":[{"count":2,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}