{"id":197,"date":"2015-05-12T09:01:33","date_gmt":"2015-05-12T00:01:33","guid":{"rendered":"http:\/\/www.raythebm.net\/weblog\/?p=197"},"modified":"2015-05-12T09:01:33","modified_gmt":"2015-05-12T00:01:33","slug":"ufw-%e3%81%ab%e3%82%88%e3%82%8b%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.raythebm.net\/weblog\/archives\/197","title":{"rendered":"ufw \u306b\u3088\u308b\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb"},"content":{"rendered":"<p>\u4eca\u56de\u306f ufw \u3067\u3059\u3002<br \/>\n\u4ee5\u524d\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3042\u308b\u306e\u306f\u77e5\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001VPS \u306e Ubuntu 14.04 LTS \u306b\u6a19\u6e96\u3067\u5165\u3063\u3066\u308b\u306e\u3092\u89e6\u308b\u307e\u3067\u30b9\u30eb\u30fc\u3057\u3066\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3068\u8a00\u3048\u3070\u8a2d\u5b9a\u3057\u305f\u9014\u7aef\u306b SSH \u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u3066\u3001\u6ce3\u304d\u306a\u304c\u3089\u5b9f\u30de\u30b7\u30f3\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u307e\u3067\u99c6\u3051\u4ed8\u3051\u308b\u30cf\u30e1\u306b\u306a\u308b\u3001\u3068\u3044\u3046\u306e\u306f\u3088\u304f\u6709\u308b\u8a71\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u30af\u30e9\u30a6\u30c9\u306e VPS \u3092\u4f7f\u3063\u3066\u304a\u308a\u3001\u4f55\u6545\u304b Web \u306e\u7ba1\u7406\u753b\u9762\u304b\u3089\u30b3\u30f3\u30bd\u30fc\u30eb\u304c\u898b\u3089\u308c\u306a\u3044\u3068\u3044\u3046\u3001\u5371\u967a\u304c\u5371\u306a\u3044\u72b6\u614b\u3060\u3063\u305f\u306e\u3067\u7d30\u5fc3\u306e\u6ce8\u610f\u3092\u6255\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068 man \u3092\u8aad\u307f\u6f01\u308a\u3001iptables \u306e\u4e00\u756a\u4e0a\u306b\u4f5c\u696d\u30de\u30b7\u30f3\u306e IP \u8a31\u53ef\u8a2d\u5b9a\u3092\u7a81\u3063\u8fbc\u307f\u3001ufw \u306b\u3082 IP \u306e\u8a31\u53ef\u3068 SSH \u306e\u8a31\u53ef\u3092\u8a2d\u5b9a\u3057\u305f\u4e0a\u3067\u30c9\u30ad\u30c9\u30ad\u3057\u306a\u304c\u3089\u300cufw enable\u300d\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u7d50\u679c\u7684\u306b\u306f ufw \u306e\u8a2d\u5b9a\u3060\u3051\u3067\u3082\u5341\u5206\u3067\u3057\u305f\u304c\u3001iptables \u306b\u66f8\u3044\u3066\u304a\u3044\u305f\u8a2d\u5b9a\u304c\u4e0a\u306b\u6b8b\u3063\u3066\u3044\u308b\u306e\u3092\u898b\u3066\u3001\u8ee2\u3070\u306c\u5148\u306e\u6756\u306f\u5927\u4e8b\u3060\u3068\u5b9f\u611f\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b ufw \u306e\u4f7f\u3044\u65b9\u306f\u3001\u8a2d\u5b9a\u3092 ufw \u30b3\u30de\u30f3\u30c9\u3067\u884c\u3044\u3001\u6e96\u5099\u304c\u3067\u304d\u305f\u3089\u300cufw enable\u300d\u3067\u6709\u52b9\u5316\u3059\u308b\u3068\u3044\u3046\u624b\u9806\u306b\u306a\u308a\u307e\u3059\u3002\u3068\u308a\u3042\u3048\u305a\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u8a2d\u5b9a\u3057\u3066\u304a\u3051\u3070 SSH \u304c\u5207\u308c\u308b\u5fc3\u914d\u306f\u5c11\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><code><br \/>\nufw allow 22\/tcp<br \/>\nufw allow from \u4f5c\u696d\u30de\u30b7\u30f3\u306eIP\u30a2\u30c9\u30ec\u30b9<br \/>\n<\/code><\/p>\n<p>\u6307\u5b9a\u5185\u5bb9\u306f\u300cufw status\u300d\u3067\u898b\u3089\u308c\u307e\u3059\u3002<br \/>\n\u8a73\u7d30\u306a\u5f62\u5f0f\u306f(\u79c1\u306e\u6240\u3067\u306f) \/lib\/ufw\/user.rules \u306b\u8a18\u9332\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u4e0a\u3002\u3044\u3064\u3082\u306e\u3088\u3046\u306b\u5099\u5fd8\u30e1\u30e2\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f ufw \u3067\u3059\u3002 \u4ee5\u524d\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3042\u308b\u306e\u306f\u77e5\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001VPS \u306e Ubuntu 14.04 LTS \u306b\u6a19\u6e96\u3067\u5165\u3063\u3066\u308b\u306e\u3092\u89e6\u308b\u307e\u3067\u30b9\u30eb\u30fc\u3057\u3066\u307e\u3057\u305f\u3002 \u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3068\u8a00\u3048\u3070\u8a2d\u5b9a\u3057\u305f\u9014\u7aef\u306b SSH \u304c\u4f7f\u3048 &hellip; <a href=\"https:\/\/www.raythebm.net\/weblog\/archives\/197\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/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":[9,15,14,11,45],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-it","tag-howto","tag-linux","tag-memo","tag-system","tag-45"],"_links":{"self":[{"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":3,"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":200,"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/posts\/197\/revisions\/200"}],"wp:attachment":[{"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.raythebm.net\/weblog\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}