I don’t understand that part (may be because I have not tested NAT64 yet…)
The "issue" with tayga is that it only implements "stateless NAT", this means without tracking any
connection state. Therefore it needs to map exactly one IPv4 address to every (IPv6) source address it encounters. So, it won't work directly on your typical "consumer" plan giving you only a single public IPv4 address. That's why you have to add another stateful NAT mapping all the addresses tayga assigns to your IPv6 clients to your single public address, pretty much the same like you'd do for native internal IPv4.
Do you plan on writing a full fledged article about your setup?
Actually didn't think about that. In the end, it's kind of trivial except for two things:
net/tayga comes without an rc script, and the documentation about how to setup its
tun(4) interface is Linux-specific. I'm currently using the following
/usr/local/etc/rc.d/tayga (not tested on a reboot yet ...):
Bash:
#!/bin/sh
# PROVIDE: tayga
# REQUIRE: DAEMON
# BEFORE: netif
# KEYWORD: shutdown
. /etc/rc.subr
name=tayga
desc="NAT64 daemon"
rcvar=tayga_enable
load_rc_config ${name}
: ${tayga_interface:=nat64}
command="/usr/local/sbin/tayga"
pidfile=/var/run/tayga.pid
command_args="-p ${pidfile}"
stop_postcmd=tayga_poststop
tayga_poststop()
{
/sbin/ifconfig ${tayga_interface} destroy
}
run_rc_command "$1"
and have the following in
/etc/rc.conf for setup of the interface:
Code:
ifconfig_nat64="inet 192.168.x.1 172.31.0.1 netmask 255.255.0.0"
ifconfig_nat64_ipv6="inet6 up"
static_routes="nat64"
route_nat64="-net 172.31.0.0/16 -iface nat64"
ipv6_static_routes="nat64"
ipv6_route_nat64="-net 2001:xxxx:xxxx:ffff::/96 -iface nat64"
where
192.168.x.1
is
some local address (assigned to another interface) of my router/firewall machine and
2001:xxxx:xxxx:ffff::/96
is the NAT64-prefix I chose. As you can also see, I chose
172.31.0.0/16
for tayga to map IPv4 addresses to IPv6 source addresses.