From owner-freebsd-current@FreeBSD.ORG Thu Jul 12 15:40:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A47761065672 for ; Thu, 12 Jul 2012 15:40:37 +0000 (UTC) (envelope-from nil@mad.dog.cx) Received: from msv5.zenno.net (msv5.zenno.net [125.53.25.155]) by mx1.freebsd.org (Postfix) with SMTP id 1F21B8FC08 for ; Thu, 12 Jul 2012 15:40:37 +0000 (UTC) Received: (qmail 78912 invoked from network); 13 Jul 2012 00:33:54 +0900 Received: from unknown (HELO lenovo-b0c22c0d) (nil@mad.dog.cx@110.66.100.43) by msv5.zenno.net with SMTP; 13 Jul 2012 00:33:54 +0900 Content-Type: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes To: freebsd-current@freebsd.org Date: Fri, 13 Jul 2012 00:33:21 +0900 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "HIROSHI OOTA" Message-ID: User-Agent: Opera Mail/12.00 (Win32) Subject: [CFT] ng_nptv6 (IPv6-to-IPv6 Network Prefix Translation) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 15:40:37 -0000 Hi, all I have created a netgraph node which performs a IPv6-to-IPv6 Network Prefix Translation(RFC6296). It works with ipfw(ng_ipfw). a sample configuration is follows. 1 setup netgraph ngctl mkpeer ipfw: nptv6 1000 inbound ngctl name ipfw:1000 nptv6 ngctl connect ipfw: nptv6: 2000 outbound ngctl msg nptv6: setconfig { inner=fd00:1234:1234::/48 outer=2001:db8::/32 } or use rcng script(ng_nptv6.sh) which is included in archive. 2 setup ipfw # inbound ipfw 1000 allow ip6 from any to 2001:db8::/64 in ipfw 1010 netgraph 1000 ip6 from any to 2001:db8::/32 in ipfw 1090 allow ip6 from any to any in # outbound ipfw 2000 allow ip6 from 2001:db8::/64 to any out ipfw 2010 netgraph 2000 ip6 from 2001:db8::/32 to any out ipfw 2090 allow ip6 from any to any in You can download from http://hp.vector.co.jp/authors/VA052357/ng_nptv6-0.0.tar.xz Comments and tests results are welcome! -- HIROSHI OOTA