{"id":3832,"date":"2015-12-10T18:25:32","date_gmt":"2015-12-10T09:25:32","guid":{"rendered":"http:\/\/blog.bitmeister.jp\/?p=3832"},"modified":"2015-12-10T18:25:32","modified_gmt":"2015-12-10T09:25:32","slug":"ubnutu-14-04-lts%e3%81%a7%e6%9c%80%e6%96%b0%e7%89%88%e3%81%aeiptables%e3%82%92%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/blog.bitmeister.jp\/?p=3832","title":{"rendered":"Ubnutu 14.04 LTS\u3067\u6700\u65b0\u7248\u306eiptables\u3092\u4f7f\u3046"},"content":{"rendered":"<p>Ubuntu 14.04 LTS\u306b\u5c0e\u5165\u3055\u308c\u3066\u3044\u308biptables\u304c\u53e4\u3044\u306e\u3067\u6700\u65b0\u7248\u3092\u30d3\u30eb\u30c9\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u305d\u306e\u5099\u5fd8\u9332\u3067\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>Ubuntu 14.04 LTS\u306b\u5c0e\u5165\u3055\u308c\u3066\u3044\u308biptables\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ iptables -V\r\niptables v1.4.21\r\n<\/pre>\n<p>\u666e\u901a\u306b\u4f7f\u3046\u5206\u306b\u306f\u56f0\u308b\u3053\u3068\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u3001kernel\u306e\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u6d3b\u304b\u3059\u306b\u306fiptables\u3082\u65b0\u3057\u304f\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<h2>\u52d5\u4f5c\u74b0\u5883<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u78ba\u8a8d\u624b\u9806\u306b\u306a\u308a\u307e\u3059\u3002\u306a\u304a\u3001\u30d3\u30eb\u30c9\u3057\u305fiptables\u3092\u7528\u3044\u305f\u7d30\u304b\u3044\u52d5\u4f5c\u78ba\u8a8d\u306f\u3057\u3066\u304a\u308a\u307e\u305b\u3093\u306e\u3067\u3042\u3057\u304b\u3089\u305a\u3002<\/p>\n<h3>Ubuntu Server 14.04.3 LTS<\/h3>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ lsb_release -drc\r\nDescription:    Ubuntu 14.04.3 LTS\r\nRelease:        14.04\r\nCodename:       trusty\r\n<\/pre>\n<h3>Linux Kernel<\/h3>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ uname -r\r\n3.19.0-25-generic\r\n<\/pre>\n<h2>\u30d3\u30eb\u30c9\u624b\u9806<\/h2>\n<h3>\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u30d3\u30eb\u30c9\u306b\u5fc5\u8981\u306a\u30c4\u30fc\u30eb\u30c1\u30a7\u30a4\u30f3\u3084\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u53d6\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ sudo apt-get install build-essential git dh-autoreconf pkg-config bison flex libmnl-dev\r\n<\/pre>\n<h3>\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210<\/h3>\n<p>\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u305d\u306e\u4e0b\u3067\u4f5c\u696d\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ mkdir work\r\n$ cd work\r\n<\/pre>\n<h3>libnftnl<\/h3>\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u5c0e\u5165\u3067\u304d\u306a\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6700\u65b0\u306eiptables\u3067\u306f\u7528\u3044\u3066\u3044\u308b\u306e\u3067\u3053\u3061\u3089\u304b\u3089\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/netfilter.org\/projects\/libnftnl\/\" target=\"_blank\">The netfilter.org &#8220;libnftnl&#8221; project<\/a><\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ git clone git:\/\/git.netfilter.org\/libnftnl\r\n$ cd libnftnl\r\n$ .\/autogen.sh &amp;&amp; .\/configure\r\n$ make\r\n$ sudo make install\r\n$ sudo ldconfig\r\n$ cd ..\r\n<\/pre>\n<p>\u30d3\u30eb\u30c9\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ ls \/usr\/local\/lib\/libnftnl*\r\n\/usr\/local\/lib\/libnftnl.la  \/usr\/local\/lib\/libnftnl.so.4\r\n\/usr\/local\/lib\/libnftnl.so  \/usr\/local\/lib\/libnftnl.so.4.0.0\r\n<\/pre>\n<h3>iptables<\/h3>\n<p>\u3055\u3066\u3001\u3088\u3046\u3084\u304f\u672c\u547d\u306eiptables\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/netfilter.org\/projects\/iptables\/\" target=\"_blank\">The netfilter.org &#8220;iptables&#8221; project<\/a><\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ git clone git:\/\/git.netfilter.org\/iptables\r\n$ cd iptables\r\n$ .\/autogen.sh &amp;&amp; .\/configure\r\n$ make\r\n$ sudo make install\r\n$ cd ..\r\n<\/pre>\n<p>&#8220;\/usr\/local\/sbin&#8221;\u914d\u4e0b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306eiptables\u306f&#8221;\/sbin&#8221;\u914d\u4e0b\u306b\u6b8b\u3063\u3066\u3044\u308b\u306e\u3067\u30d1\u30b9\u3092\u5207\u308a\u66ff\u3048\u308c\u3070\u3069\u3061\u3089\u3082\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ \/usr\/local\/sbin\/iptables -V\r\niptables v1.6.0\r\n<\/pre>\n<h3>nftables<\/h3>\n<p>\u3064\u3044\u3067\u306biptables\u306e\u5f8c\u7d99\u3001\u3068\u3044\u3046\u304b{ip,ip6,arp,eb}tables\u3092\u7d71\u5408\u3059\u308b\u3089\u3057\u3044nftables\u3082\u5165\u308c\u3066\u307f\u307e\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><a href=\"http:\/\/netfilter.org\/projects\/nftables\/\" target=\"_blank\">The netfilter.org &#8220;nftables&#8221; project<\/a><\/p>\n<p>\u4e00\u90e8\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308b\u306e\u3067\u8ffd\u52a0\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ sudo apt-get install libgmp3-dev libreadline6-dev\r\n$ git clone git:\/\/git.netfilter.org\/nftables\r\n$ cd nftables\r\n$ .\/autogen.sh &amp;&amp; .\/configure\r\n$ make\r\n$ sudo make install\r\n$ cd ..\r\n<\/pre>\n<p>&#8220;\/usr\/local\/sbin&#8221;\u914d\u4e0b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ nft -v\r\nnftables v0.5 (Support Edward Snowden)\r\n<\/pre>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u306f&#8221;0.5&#8243;\u3002\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u3082<\/p>\n<blockquote><p>It is currently under development.<\/p><\/blockquote>\n<p>\u3068\u3042\u308b\u306e\u3067\u30b4\u30ea\u30b4\u30ea\u4f7f\u3046\u3053\u3068\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304c\u3001\u4eca\u5f8c\u306fiptables\u3088\u308a\u3082nftables\u306e\u307b\u3046\u306e\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u304f\u3068\u601d\u308f\u308c\u307e\u3059\u306e\u3067\u3044\u3064\u304b\u306f\u4f7f\u3044\u65b9\u3092\u899a\u3048\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u306e\u5f8c\u308d\u306e\u30b5\u30dd\u30fc\u30c8\u8005\u306f\u3082\u3057\u304b\u3057\u3066\u3042\u306e\u5fa1\u65b9\u306a\u306e\u3067\u3057\u3087\u3046\u304b\uff08\u3088\u304f\u308f\u304b\u308a\u307e\u305b\u3093\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 14.04 LTS\u306b\u5c0e\u5165\u3055\u308c\u3066\u3044\u308biptables\u304c\u53e4\u3044\u306e\u3067\u6700\u65b0\u7248\u3092\u30d3\u30eb\u30c9\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u305d\u306e\u5099\u5fd8\u9332\u3067\u3059\u3002<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[18],"class_list":["post-3832","post","type-post","status-publish","format-standard","hentry","category-tech","tag-linux"],"_links":{"self":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3832"}],"version-history":[{"count":11,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3832\/revisions"}],"predecessor-version":[{"id":3843,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3832\/revisions\/3843"}],"wp:attachment":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}