{"id":3495,"date":"2013-09-14T10:37:22","date_gmt":"2013-09-14T01:37:22","guid":{"rendered":"http:\/\/www.vincentina.net\/?p=3495"},"modified":"2020-02-23T16:53:52","modified_gmt":"2020-02-23T07:53:52","slug":"cat%e3%81%a8%e3%83%aa%e3%83%80%e3%82%a4%e3%83%ac%e3%82%af%e3%83%88%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86","status":"publish","type":"post","link":"https:\/\/www.vincentina.net\/?p=3495","title":{"rendered":"cat\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308d\u3046"},"content":{"rendered":"<p>FreeBSD\u306e\u521d\u671f\u8a2d\u5b9a\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u3069\u304d\u3092\u4f5c\u3063\u3066\u308b\u6642\u306b\u3001\u305f\u3068\u3048\u3070ipfilter\u3068\u304b\u306b\u4f7f\u3063\u305f\u308a\u3001cron\u3068\u304b\u306b\u4f7f\u3063\u305f\u308a\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u4f5c\u308a\u65b9\u3092\u3069\u3046\u3057\u3088\u3046\u304b\u3068\u60a9\u3093\u3067\u305f\u3068\u3053\u308d\u3002<\/p>\n<p>\u304a\u305d\u3089\u304f\u8272\u3005\u306a\u7528\u9014\u304c\u3042\u308b\u3068\u601d\u3046\u3051\u3069\u3001cat\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u4f7f\u3063\u3066\u3053\u3093\u306a\u4e8b\u304c\u3067\u304d\u305f\u306e\u304b\u30fc\u3068\u826f\u3044\u4e8b\u3092\u77e5\u3063\u305f\u3002<\/p>\n<p>\u8a00\u8449\u3058\u3083\u4e0a\u624b\u304f\u8aac\u660e\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u30b3\u30de\u30f3\u30c9\u3067\u66f8\u3044\u3066\u307f\u308b\u3002<br \/>\n\u3053\u306e\u307e\u307e\u3058\u3083\u4f7f\u3048\u306a\u3044\u306e\u3067\u3042\u304f\u307e\u3067\u4f8b\u3068\u3057\u3066\u898b\u3066\u306d\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u306a\u3093\u3067\u3082\u3044\u3044\u3051\u3069\u3001\u3068\u308a\u3042\u3048\u3058<\/p>\n<pre>% vi set.sh\r\n\r\n\u30001 #!\/bin\/sh\r\n\u00a0 2 \r\n\u00a0 3 ip=$1\r\n\u00a0 4 \r\n\u00a0 5 cat &lt;&lt; EOF &gt; ipfilter.txt\r\n\u00a0 6 block in log quick from any to any with ipopts\r\n\u00a0 7 block in log quick proto tcp from any to any with short\r\n\u00a0 8 \r\n\u00a0 9 pass in on em0 all head 100\r\n\u00a010 block in from 127.0.0.0\/8 to any group 100\r\n\u00a011 block in from $ip\/32 to any group 100\r\n\u00a012 pass out on em0 all head 150\r\n\u00a013 block out from 127.0.0.0\/8 to any group 150\r\n\u00a014 block out from any to 127.0.0.0\/8 group 150\r\n\u00a015 block out from any to $ip\/32 group 150\r\n\u00a016 \r\n\u00a017 EOF\r\n\u00a018<\/pre>\n<p>\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u306b\u3059\u308b\u3068\u3059\u308b\u3068\u3002<\/p>\n<pre>% .\/set.sh 192.168.1.100<\/pre>\n<p>\u305d\u3057\u3066\u3001\u3053\u3093\u306a\u98a8\u306b\u5b9f\u884c\u3059\u308b\u3068\u3059\u308b\u3068\u3002<br \/>\n\u4e2d\u8eab\u3092\u307f\u308b\u3068\u3001\u3086\u3067\u5375\u3058\u3083\u306a\u304f\u3066\u30d5\u30a1\u30a4\u30eb\u304c\u3067\u304d\u3066\u308b\u3002<\/p>\n<pre>% cat ipfilter.txt\r\nblock in log quick from any to any with ipopts\r\nblock in log quick proto tcp from any to any with short\r\n\r\npass in on em0 all head 100\r\nblock in from 127.0.0.0\/8 to any group 100\r\nblock in from 192.168.1.100\/32 to any group 100\r\npass out on em0 all head 150\r\nblock out from 127.0.0.0\/8 to any group 150\r\nblock out from any to 127.0.0.0\/8 group 150\r\nblock out from any to 192.168.1.100\/32 group 150<\/pre>\n<p>\u3053\u3046\u306a\u308b\u306e\u306d\u3002<br \/>\n\u3058\u3064\u306b\u7d20\u6674\u3089\u3057\u3044\u3002\n<\/p>\n<p>\u305f\u3068\u3048\u3070\/etc\/ipfilter\u3068\u304b\u306b\u3082\u4f7f\u3048\u308b\u3057\u3001\/etc\/crontab\u306b\u3082\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092&gt;\u306e\u4e0a\u66f8\u304d\u3067\u306a\u304f\u3066&gt;&gt;\u3067\u8ffd\u8a18\u306b\u3059\u308c\u3070OK\u3060\u308d\u3046\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u3058\u305f\u3044\u306f\u521d\u6b69\u7684\u306a\u4e8b\u3060\u3051\u3069\u3001\u3084\u306f\u308a\u57fa\u672c\u306e\u7a4d\u307f\u91cd\u306d\u304c\u5927\u4e8b\u3068\u3044\u3046\u4e8b\u3092\u8003\u3048\u308b\u306d\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><em>\u3053\u306a\u3044\u3060<\/em><strong>WOWOW<em>\u3067<\/em><\/strong>\u8cb4\u5fd7 \u7950\u4ecb\u7279\u96c6\u3092\u3084\u3063\u3066\u305f\u306e\u3067\u60aa\u306e\u6559\u5178\u3068\u3044\u3046\u6620\u753b\u3092\u898b\u305f\u306e\u3060\u3051\u3069\u3001\u9ed2\u3044\u5bb6\u3068\u540c\u3058\u304f\u5c0f\u8aac\u306e\u65b9\u304c\u304a\u3082\u3057\u308d\u3044\u306e\u3060\u308d\u3046\u304b\u3002<br \/>\n\u5f8c\u534a\u306b\u304b\u3051\u3066\u306e\u5c55\u958b\u304c\u30a8\u30eb\u30d5\u306e\u907a\u4f5c\u3063\u3066\u30b2\u30fc\u30e0\u3092\u601d\u3044\u51fa\u3057\u305f\u3002<\/p>\n<p>\u30aa\u30c1\u3068\u65e5\u8a18\u306e\u5185\u5bb9\u304c\u5168\u304f\u95a2\u4fc2\u306a\u3044\u3051\u3069\u3001\u307e\u3042\u3044\u3044\u304b\u3002<\/p>\n<p>&nbsp;<\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.vincentina.net\/?p=3495\" data-text=\"cat\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308d\u3046\" data-via=\"TakekenTw\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>FreeBSD\u306e\u521d\u671f\u8a2d\u5b9a\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u3069\u304d\u3092\u4f5c\u3063\u3066\u308b\u6642\u306b\u3001\u305f\u3068\u3048\u3070ipfilter\u3068\u304b\u306b\u4f7f\u3063\u305f\u308a\u3001cron\u3068\u304b\u306b\u4f7f\u3063\u305f\u308a\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u4f5c\u308a\u65b9\u3092\u3069\u3046\u3057\u3088\u3046\u304b\u3068\u60a9\u3093\u3067\u305f\u3068\u3053\u308d\u3002 \u304a\u305d\u3089\u304f\u8272\u3005\u306a\u7528\u9014\u304c\u3042\u308b\u3068\u601d\u3046\u3051\u3069\u3001cat &hellip; <a href=\"https:\/\/www.vincentina.net\/?p=3495\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;cat\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308d\u3046&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-3495","post","type-post","status-publish","format-standard","hentry","category-server"],"_links":{"self":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/posts\/3495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3495"}],"version-history":[{"count":0,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=\/wp\/v2\/posts\/3495\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vincentina.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}