The faithd utility provides IPv6-to-IPv4 TCP relay. It must be used on an IPv4/v6 dual stack router.
When faithd receives TCPv6 traffic, faithd will relay the TCPv6 traffic to TCPv4. Destination for relayed TCPv4 connection will be determined by the last 4 octets of the original IPv6 destination. For example, if 3ffe:0501:4819:ffff:: is reserved for faithd, and the TCPv6 destination address is 3ffe:0501:4819:ffff::0a01:0101, the traffic will be relayed to IPv4 destination 10.1.1.1.
To use faithd translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. Kernel must be properly configured to route all the TCP connection toward the reserved IPv6 address prefix into the faith(4) pseudo interface, by using route(8) command. Also, sysctl(8) should be used to configure net.inet6.ip6.keepfaith to 1.
The router must be configured to capture all the TCP traffic toward reserved IPv6 address prefix, by using route(8) and sysctl(8) commands.
The faithd utility needs a special name-to-address translation logic, so that hostnames gets resolved into special IPv6 address prefix. For small-scale installation, use hosts(5). For large-scale installation, it is useful to have a DNS server with special address translation support. An implementation called totd is available at http://www.vermicelli.pasta.cs.uit.no/ipv6/software.html. Make sure you do not propagate translated DNS records to normal DNS cloud, it is highly harmful.
When faithd is invoked as a standalone program, faithd will daemonize itself. The faithd utility will listen to TCPv6 port service. If TCPv6 traffic to port service is found, it relays the connection.
Since faithd listens to TCP port service, it is not possible to run local TCP daemons for port service on the router, using inetd(8) or other standard mechanisms. By specifying serverpath to faithd, you can run local daemons on the router. The faithd utility will invoke local daemon at serverpath if the destination address is local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify serverargs for the arguments for the local daemon.
The following options are available: