]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man4/faith.4
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man4 / faith.4
1 .\"     $KAME: faith.4,v 1.9 2001/04/27 17:26:35 itojun Exp $
2 .\"
3 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the project nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\" $FreeBSD$
31 .\"
32 .Dd January 23, 2012
33 .Dt FAITH 4
34 .Os
35 .Sh NAME
36 .Nm faith
37 .Nd IPv6-to-IPv4 TCP relay capturing interface
38 .Sh SYNOPSIS
39 .Cd "device faith"
40 .Sh DESCRIPTION
41 The
42 .Nm
43 interface captures IPv6 TCP traffic,
44 for implementing userland IPv6-to-IPv4 TCP relay
45 like
46 .Xr faithd 8 .
47 .Pp
48 Each
49 .Nm
50 interface is created at runtime using interface cloning.
51 This is
52 most easily done with the
53 .Xr ifconfig 8
54 .Cm create
55 command or using the
56 .Va cloned_interfaces
57 variable in
58 .Xr rc.conf 5 .
59 .Pp
60 Special action will be taken when IPv6 TCP traffic is seen on a router,
61 and the default routing table suggests to route it to the
62 .Nm
63 interface.
64 In this case, the packet will be accepted by the router,
65 regardless of the list of IPv6 interface addresses assigned to the router.
66 The packet will be captured by an IPv6 TCP socket, if it has the
67 .Dv IN6P_FAITH
68 flag turned on and matching address/port pairs.
69 As a result,
70 .Nm
71 will let you capture IPv6 TCP traffic to some specific destination addresses.
72 Userland programs, such as
73 .Xr faithd 8
74 can use this behavior to relay IPv6 TCP traffic to IPv4 TCP traffic.
75 The program can accept some specific IPv6 TCP traffic, perform
76 .Xr getsockname 2
77 to get the IPv6 destination address specified by the client,
78 and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
79 .Pp
80 The
81 .Dv IN6P_FAITH
82 flag on a IPv6 TCP socket can be set by using
83 .Xr setsockopt 2 ,
84 with level
85 .Dv IPPROTO_IPV6
86 and optname
87 .Dv IPv6_FAITH .
88 .Pp
89 To handle error reports by ICMPv6, some ICMPv6 packets routed to an
90 .Nm
91 interface will be delivered to IPv6 TCP, as well.
92 .Pp
93 To understand how
94 .Nm
95 can be used, take a look at the source code of
96 .Xr faithd 8 .
97 .Pp
98 As the
99 .Nm
100 interface implements potentially dangerous operations,
101 great care must be taken when configuring it.
102 To avoid possible misuse, the
103 .Xr sysctl 8
104 variable
105 .Li net.inet6.ip6.keepfaith
106 must be set to
107 .Li 1
108 prior to using the interface.
109 When
110 .Li net.inet6.ip6.keepfaith
111 is
112 .Li 0 ,
113 no packets will be captured by the
114 .Nm
115 interface.
116 .Pp
117 The
118 .Nm
119 interface is intended to be used on routers, not on hosts.
120 .\"
121 .Sh SEE ALSO
122 .Xr inet 4 ,
123 .Xr inet6 4 ,
124 .Xr faithd 8
125 .Rs
126 .%A Jun-ichiro itojun Hagino
127 .%A Kazu Yamamoto
128 .%T "An IPv6-to-IPv4 transport relay translator"
129 .%O RFC3142
130 .Re
131 .Sh HISTORY
132 The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the
133 WIDE hydrangea IPv6 stack.