$KAME: faith.4,v 1.9 2001/04/27 17:26:35 itojun Exp $ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, t...
NAMEfaith - IPv6-to-IPv4 TCP relay capturing interface
DESCRIPTIONThe ifconfig interface captures IPv6 TCP traffic, for implementing userland IPv6-to-IPv4 TCP relay like faithd(8).
Each ifconfig interface is created at runtime using interface cloning. This is most easily done with the ifconfig(8) create command or using the cloned_interfaces variable in rc.conf5.
Special action will be taken when IPv6 TCP traffic is seen on a router, and the default routing table suggests to route it to the ifconfig interface. In this case, the packet will be accepted by the router, regardless of the list of IPv6 interface addresses assigned to the router. The packet will be captured by an IPv6 TCP socket, if it has the IN6P_FAITH flag turned on and matching address/port pairs. As a result, ifconfig will let you capture IPv6 TCP traffic to some specific destination addresses. Userland programs, such as faithd(8) can use this behavior to relay IPv6 TCP traffic to IPv4 TCP traffic. The program can accept some specific IPv6 TCP traffic, perform getsockname(2) to get the IPv6 destination address specified by the client, and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
The IN6P_FAITH flag on a IPv6 TCP socket can be set by using setsockopt(2), with level IPPROTO_IPV6 and optname IPv6_FAITH
To handle error reports by ICMPv6, some ICMPv6 packets routed to an ifconfig interface will be delivered to IPv6 TCP, as well.
To understand how ifconfig can be used, take a look at the source code of faithd(8).
As the ifconfig interface implements potentially dangerous operations, great care must be taken when configuring it. To avoid possible misuse, the sysctl(8) variable net.inet6.ip6.keepfaith must be set to 1 prior to using the interface. When net.inet6.ip6.keepfaith is 0 no packets will be captured by the ifconfig interface.
The ifconfig interface is intended to be used on routers, not on hosts.
SEE ALSOinet(4), inet6(4), faithd(8)
- Jun-ichiro itojun Hagino Kazu Yamamoto "An IPv6-to-IPv4 transport relay translator" RFC3142