We use KAME's NAT-PT implemenation for FreeBSD 4.10 (kame-20041206-freebsd410-snap.tgz) that can be downloaded from "ftp.kame.net/pub/kame/snap/".
% tar xvzf kame-20041206-freebsd410-snap.tgz
% cd kame
% make TARGET=freebsd4 prepare
% cd freebsd4
# cp /kernel /kernel.previous
# cd /usr
# mkdir include.clean
# cd include.clean
# (cd ../include; tar Bpcf - .) | tar Bpxf -
% cd kame/freebsd4/sys/i386/conf
% cp GENERIC.KAME CONFIGFILE
% vi CONFIGFILE
% config CONFIGFILE
% cd ../../compile/CONFIGFILE
% make depend && make
# make install
% make includes
# make install-includes
% make # make install
# fastboot
% uname -a
PATH=/usr/local/v6/sbin:/usr/local/v6/bin:${PATH}
OPTIONAL_MANPATH /usr/local/v6/man
ipv6_enable="YES" ipv6_network_interfaces="xl0" ipv6_gateway_enable="YES" ipv6_prefix_xl0="3ffe:501:ffff:10" rtadvd_enable="YES" rtadvd_interfaces="xl0"
# cp /usr/local/v6/etc/rtadvd.conf.sample /etc/rtadvd.conf
# man rtadvd.conf
default:\ :chlim#64:raflags#0:rltime#1800:rtime#0:retrans#0:\ :pinfoflags#192:vltime#2590000:pltime#604800:mtu#1500: xl0:\ :addr="3ffe:501:ffff:10000::"prefixlen#64:tc=default:
#cp kame/kame/kame/natptconfig/natpt.conf /etc/natpt.conf
# man natptconfig
% cd kame/kame/kame/natptconfig
% more natptconfig.usage
"Natptconfig" command is for configuring IPv6-to-IPv4 translator in the kernel.
# natptconfig -f /etc/natpt.conf
# natptconfig show rules
# natptconfig show xlate
if [ -f /usr/local/v6/sbin/natptconfig]; then /usr/local/v6/sbin/natptconfig -f /etc/natpt.conf echo "Start natptconfig" fi
"Natptlog" command is for monitoring logged packets.
# natptlog -b
# natptlog -d [debuglevel]
if [ -f /usr/local/v6/sbin/natptlog]; then /usr/local/v6/sbin/natptlog -b echo "Start natptlog" fi
!natptlog *.* /usr/home/vasaka/natptlog.txtHere, we suppose our log file is "/usr/home/vasaka/natptlog.txt". You can change whereever you want, for example, in the directory /var/log
% touch /usr/home/vasaka/natptlog.txt