A Tundra instance with a very similar configuration to the one in this directory has been successfully deployed on a TP-Link TL-WR841N v13 running OpenWRT 21.02.5.
WARNING: As of now, this example does not work on OpenWRT 22.03 and later, as these versions do not have iptables
installed (at least not by default), and the firewall.user
script is not available there!
This configuration assumes that your router has a dual-stack (both IPv4 and IPv6) connectivity, and that a NAT masquerade is performed on IPv4 packets going to your WAN interface. You might want to adjust interface names, IP addresses and file paths before deploying this configuration!
-
Install the
kmod-tun
,kmod-ipt-nat6
,kmod-nf-nat6
andkmod-nft-nat6
packages usingopkg
. -
Cross-compile Tundra for your router's target using the OpenWRT SDK. See this page for more information. For example:
CC=mipsel-openwrt-linux-gcc cmake -S. -Bbuild make -Cbuild
-
Copy the compiled Tundra binary to your router (e.g. using
scp
). This configuration uses the following path:/usr/local/sbin/tundra-nat64
. -
Copy the Tundra configuration file,
tundra-nat64.conf
, to your router. This configuration uses the following path:/etc/tundra-nat64/tundra-nat64.conf
. -
Copy the
procd
service file,tundra-nat64
, to your router – use the path/etc/init.d/tundra-nat64
. -
Configure your router's firewall – append the contents of
firewall.user
to/etc/firewall.user
on your router. You may also edit this file using LuCI: Network --> Firewall --> Custom Rules. -
Start the service by executing
/etc/init.d/tundra-nat64 start
, and if everything works correctly, enable it by executing/etc/init.d/tundra-nat64 enable
, so it starts automatically on every boot. If you encounter any problems, you may try restarting your router.