{"id":7251,"date":"2021-03-23T11:06:00","date_gmt":"2021-03-23T02:06:00","guid":{"rendered":"https:\/\/www.secuavail.com\/kb\/?p=7251"},"modified":"2024-08-26T15:55:53","modified_gmt":"2024-08-26T06:55:53","slug":"tb-210324_03","status":"publish","type":"post","link":"https:\/\/www.secuavail.com\/kb\/tech-blog\/tb-210324_03\/","title":{"rendered":"Linux\u306b\u3066\u7279\u5b9a\u306e\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u901a\u4fe1\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u4f8b"},"content":{"rendered":"<p>\u5f53\u8a18\u4e8b\u3067\u306f\u3001Linux\u306b\u3066\u7279\u5b9a\u306e\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u901a\u4fe1\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u4f8b\u306b\u3064\u3044\u3066\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<ul style=\"list-style-type: disc;\">\n<li>\u5f53\u8a18\u4e8b\u3067\u306fhttp\u30b5\u30fc\u30d3\u30b9\u306e\u30dd\u30fc\u30c8\u3092TCP\/80\u306e\u524d\u63d0\u3067\u8a18\u8f09\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>\u5f53\u8a18\u4e8b\u306e\u624b\u9806\u306f\u3059\u3079\u3066\u7ba1\u7406\u8005\u6a29\u9650\u306b\u3066\u5b9f\u65bd\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>\u5f53\u8a18\u4e8b\u306e\u8a18\u8f09\u5185\u5bb9\u306f\u4e0b\u8a18\u74b0\u5883\u306b\u3066\u5b9f\u65bd\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/li>\n<\/ul>\n<table style=\"height: 48px; width: 700px;\" width=\"713\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"font-weight: 400; width: 295.799px; height: 24px;\">OS<\/td>\n<td style=\"font-weight: 400; width: 390.243px; height: 24px;\">CentOS7.7<\/td>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"font-weight: 400; width: 295.799px; height: 24px;\">firewalld<\/td>\n<td style=\"font-weight: 400; width: 390.243px; height: 24px;\">0.6.3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>CentOS\u4e0a\u306ehttp\u30b5\u30fc\u30d3\u30b9\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5834\u5408<\/h2>\n<ul style=\"list-style-type: disc;\">\n<li>\u30dd\u30fc\u30c8\u756a\u53f7\u5358\u4f4d\u3067\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306f\u300cfirewall-cmd --add-port\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\"># firewall-cmd --add-port=80\/tcp\r\nsuccess\r\n# firewall-cmd --list-ports\r\n80\/tcp<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30dd\u30fc\u30c8\u756a\u53f7\u5358\u4f4d\u3067\u306e\u8a2d\u5b9a\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u300cfirewall-cmd --list-ports\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\"># firewall-cmd --list-ports\r\n80\/tcp\r\n#<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30dd\u30fc\u30c8\u756a\u53f7\u5358\u4f4d\u3067\u306e\u8a2d\u5b9a\u3092\u524a\u9664\u3059\u308b\u5834\u5408\u306f\u300cfirewall-cmd --remove-port\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true \"># firewall-cmd --remove-port=80\/tcp\r\nsuccess\r\n# firewall-cmd --list-ports\r\n\r\n#<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30b5\u30fc\u30d3\u30b9\u5358\u4f4d\u3067\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306f\u300cfirewall-cmd --add-service\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true \"># firewall-cmd --add-service=http\r\nsuccess\r\n#<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30b5\u30fc\u30d3\u30b9\u540d\u3068\u7d10\u3065\u3044\u305f\u30dd\u30fc\u30c8\u756a\u53f7\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb\u5bfe\u5fdc\u306f\/etc\/services\u3088\u308a\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\"># cat \/etc\/services | grep -e ^http\r\nhttp            80\/tcp          www www-http    # WorldWideWeb HTTP\r\nhttp            80\/udp          www www-http    # HyperText Transfer Protocol\r\nhttp            80\/sctp                         # HyperText Transfer Protocol\r\nhttps           443\/tcp                         # http protocol over TLS\/SSL\r\nhttps           443\/udp                         # http protocol over TLS\/SSL\r\nhttps           443\/sctp                        # http protocol over TLS\/SSL\r\n\uff5e\u7701\u7565\uff5e\r\n#<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30b5\u30fc\u30d3\u30b9\u5358\u4f4d\u3067\u306e\u8a2d\u5b9a\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u300cfirewall-cmd --list-services\u300d\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\"># firewall-cmd --list-services\r\ndhcpv6-client http ssh\r\n#<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30b5\u30fc\u30d3\u30b9\u5358\u4f4d\u3067\u306e\u8a2d\u5b9a\u3092\u524a\u9664\u3059\u308b\u5834\u5408\u306f\u300cfirewall-cmd --remove-port\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true \"># firewall-cmd --remove-service=http\r\nsuccess\r\n# firewall-cmd --list-services\r\ndhcpv6-client ssh\r\n#<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u8a2d\u5b9a\u5185\u5bb9\u3092\u6052\u4e45\u7684\u306b\u53cd\u6620\u3055\u305b\u308b\u5834\u5408\u306f\u300cfirewall-cmd --runtime-to-permanent\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\"># firewall-cmd --runtime-to-permanent\r\nsuccess\r\n#<\/pre>\n<p>\u4ee5\u4e0a\u3067Linux\u306b\u3066\u7279\u5b9a\u306e\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u901a\u4fe1\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u4f8b\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u306f\u7d42\u4e86\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f53\u8a18\u4e8b\u3067\u306f\u3001Linux\u306b\u3066\u7279\u5b9a\u306e\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u901a\u4fe1\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u4f8b\u306b\u3064\u3044\u3066\u8a18\u8f09\u3057\u307e\u3059\u3002 \u524d\u63d0\u6761\u4ef6 \u5f53\u8a18\u4e8b\u3067\u306fhttp\u30b5\u30fc\u30d3\u30b9\u306e\u30dd\u30fc\u30c8\u3092TCP\/80\u306e\u524d\u63d0\u3067\u8a18\u8f09\u3057\u3066\u3044\u307e\u3059\u3002 \u5f53\u8a18\u4e8b\u306e\u624b\u9806\u306f\u3059\u3079\u3066\u7ba1\u7406\u8005\u6a29\u9650\u306b\u3066\u5b9f\u65bd\u3057\u3066\u3044 [&hellip;]","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[50,2],"tags":[9],"class_list":["post-7251","post","type-post","status-publish","format-standard","hentry","category-windows-linux","category-tech-blog","tag-linux"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts\/7251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/comments?post=7251"}],"version-history":[{"count":24,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts\/7251\/revisions"}],"predecessor-version":[{"id":7717,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts\/7251\/revisions\/7717"}],"wp:attachment":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/media?parent=7251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/categories?post=7251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/tags?post=7251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}