Written by: DDRRE (Snir Hassidim), 2014
Example environment configuration:
br0 (172.16.0.1/16, fd10:ffff::1/16) is an internal bridge interface that holds all internal LAN ports.
eth0 (212.4.5.63/30, 2ab0:15bc:32af:0020:a752:a467::63/96) is the external interface.
212.4.5.64/30 is the NAT64 external address.
2ab0:15bc:32af:0020:6464:6464::/96 is the pre-allocated DNS64 prefix.
1. To configure WrapSix on an Ubuntu router, edit wrapper.c in the WrapSix "src" directory, and fill in the values for INTERFACE, PREFIX, IPV4_ADDR, HOST_IPV6_ADDR and HOST_IPV4_ADDR.
INTERFACE: Set your internal interface here. Example: "br0"
PREFIX: Set your DNS64 prefix here. Example: "2ab0:15bc:32af:0020:6464:6464::"
IPV4_ADDR: Set the IPv4 address to be used for NAT64 external packets. Example: "212.4.5.64"
If you only have one external IP, you can try setting a private IP from your internal subnet (not fully tested).
HOST_IPV6_ADDR: Type your router's external IPv6 address. Example: "2ab0:15bc:32af:0020:a752:a467::63"
HOST_IPV4_ADDR: Type your router's external IPv4 address. Example: "212.4.5.63"
Note: DO NOT create an interface that uses the NAT64 address from IPV4_ADDR.
2. Compile and install wrapsix (make && make install).
3. Add it to your local startup scripts.
4. If you used a public IPv4 address in IPV4_ADDR, skip this step.
Create a NAT rule for WrapSix (add it before other rules):
iptables -t nat -I POSTROUTING 1 -s <IPv4_ADDR goes here> -j SNAT --to <IPV4_ADDR goes here>
5. Done!
This is a very userful howto, thank you DDRRE! Ad private (NATted) IPv4: it's possible to use it, there shouldn't be any problem with it (I tested it, although not on a router).
Last updated: 2023-03-13