Subject: Re: stf(4) and NAT protocol forwarding
To: None <tech-net@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 01/09/2006 23:54:00
On Sat, Jan 07, 2006 at 10:57:17PM -0600, Jonathan A. Kollasch wrote:
> Hi,
> 	Because my ADSL gateway (running OpenWrt Busybox/Linux\ 2.4)
> isn't providing me with stable 6to4 connectivity (long story, not
> on topic here) I've decided to switch my 6to4 router back to NetBSD.
> 
> I've got full control over iptables on the ADSL gateway, thus I
> can do protocol forwarding.  However, I can't get stf(4) to accept
> packets directed at its private IPv4 address.  I'm using the binat
> rule as suggested the last time this subject came up, it seems to
> let the packets get out.  I've tried using the link2 bit on stf0
> and it doesn't seem to make a bit of difference.  I can see the
> encapsulated packets arrive at the 6to4 router, directed at it's
> local private address.  lo0 holds a copy of my public IP.  This
> is on 3.0/macppc if that makes any difference.  Is there a way to
> get stf(4) to decapsulate *all* protocol 41 packets, and base
> everything on the internal destination address?

FWIW, this problem of passing IPv6 through a NAT is what Teredo was
designed to solve.  NetBSD is still missing Teredo.  See
<http://www.netbsd.org/contrib/projects.html#teredo>.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933