1 .\" $KAME: stf.4,v 1.35 2001/05/02 06:24:49 itojun Exp $
3 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
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
47 IPv6 in IPv4 encapsulation.
48 It can tunnel IPv6 traffic over IPv4, as specified in
51 For ordinary nodes in 6to4 site, you do not need
56 interface is necessary for site border router
59 in the specification).
63 interface is created at runtime using interface cloning.
65 most easily done with the
73 Due to the way 6to4 protocol is specified,
75 interface requires certain configuration to work properly.
78 valid 6to4 address needs to be configured to the interface.
79 .Dq A valid 6to4 address
80 is an address which has the following properties.
81 If any of the following properties are not satisfied,
83 raises runtime error on packet transmission.
84 Read the specification for more details.
88 .Li 2002:xxyy:zzuu::/48
91 is a hexadecimal notation of an IPv4 address for the node.
92 IPv4 address can be taken from any of interfaces your node has.
93 Since the specification forbids the use of IPv4 private address,
94 the address needs to be a global IPv4 address.
96 Subnet identifier portion
98 and interface identifier portion
100 are properly filled to avoid address collisions.
103 If you would like the node to behave as a relay router,
104 the prefix length for the IPv6 interface address needs to be 16 so that
105 the node would consider any 6to4 destination as
107 If you would like to restrict 6to4 peers to be inside certain IPv4 prefix,
108 you may want to configure IPv6 prefix length as
109 .Dq 16 + IPv4 prefix length .
111 interface will check the IPv4 source address on packets,
112 if the IPv6 prefix length is larger than 16.
115 can be configured to be ECN friendly.
116 This can be configured by
122 Please note that 6to4 specification is written as
123 .Dq accept tunnelled packet from everyone
127 device, you are making it much easier for malicious parties to inject
128 fabricated IPv6 packet to your node.
129 Also, malicious party can inject an IPv6 packet with fabricated source address
130 to make your node generate improper tunnelled packet.
131 Administrators must take caution when enabling the interface.
132 To prevent possible attacks,
134 interface filters out the following packets.
135 Note that the checks are no way complete:
138 Packets with IPv4 unspecified address as outer IPv4 source/destination
141 Packets with loopback address as outer IPv4 source/destination
144 Packets with IPv4 multicast address as outer IPv4 source/destination
147 Packets with limited broadcast address as outer IPv4 source/destination
150 Packets with private address as outer IPv4 source/destination
151 .Pq Li 10.0.0.0/8 , 172.16.0.0/12 , 192.168.0.0/16
153 Packets with subnet broadcast address as outer IPv4 source/destination.
154 The check is made against subnet broadcast addresses for
155 all of the directly connected subnets.
157 Packets that does not pass ingress filtering.
158 Outer IPv4 source address must meet the IPv4 topology on the routing table.
159 Ingress filter can be turned off by
163 The same set of rules are applied against the IPv4 address embedded into
164 inner IPv6 address, if the IPv6 address matches 6to4 prefix.
167 It is recommended to filter/audit
168 incoming IPv4 packet with IP protocol number 41, as necessary.
169 It is also recommended to filter/audit encapsulated IPv6 packets as well.
170 You may also want to run normal ingress filter against inner IPv6 address
177 interface, it is possible to disable the input path,
178 making the direct attacks from the outside impossible.
179 Note, however, there are other security risks exist.
180 If you wish to use the configuration,
181 you must not advertise your 6to4 address to others.
186 variables can be used to control the behavior of the
188 The default value is shown next to each variable.
189 .Bl -tag -width indent
190 .It Va net.link.stf.permit_rfc1918 : No 0
191 The RFC3056 requires the use of globally unique 32-bit IPv4
192 addresses. This sysctl variable controls the behaviour of this
193 requirement. When it set to not 0,
195 allows the use of private IPv4 addresses described in the RFC1918.
196 This may be useful for an Intranet environment or when some mechanisms
197 of network address translation (NAT) are used.
204 written in hexadecimals.
206 # ifconfig ne0 inet 133.4.5.6 netmask 0xffffff00
207 # ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 \\
211 The following configuration accepts packets from IPv4 source
214 It emits 6to4 packet only for IPv6 destination 2002:0901::/32
215 (IPv4 destination will match
218 # ifconfig ne0 inet 9.1.2.3 netmask 0xffff0000
219 # ifconfig stf0 inet6 2002:0901:0203:0000:a00:5aff:fe38:6f86 \\
223 The following configuration uses the
225 interface as an output-only device.
226 You need to have alternative IPv6 connectivity
228 to use this configuration.
229 For outbound traffic, you can reach other 6to4 networks efficiently via
231 For inbound traffic, you will not receive any 6to4-tunneled packets
232 (less security drawbacks).
233 Be careful not to advertise your 6to4 prefix to others
234 .Pq Li 2002:8504:0506::/48 ,
235 and not to use your 6to4 prefix as a source.
237 # ifconfig ne0 inet 133.4.5.6 netmask 0xffffff00
238 # ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 \\
239 prefixlen 16 alias deprecated link0
240 # route add -inet6 2002:: -prefixlen 16 ::1
241 # route change -inet6 2002:: -prefixlen 16 ::1 -ifp stf0
249 .Pa http://www.ipv6day.org/action.php?n=En.IPv6day
253 .%T "Connection of IPv6 Domains via IPv4 Clouds"
259 .%A Jun-ichiro itojun Hagino
260 .%T "Possible abuse against IPv6 transition technologies"
262 .%N draft-itojun-ipv6-transition-abuse-01.txt
269 device first appeared in WIDE/KAME IPv6 stack.
274 interface is allowed for a node,
275 and no more than one IPv6 interface address is allowed for an
278 It is to avoid source address selection conflicts
279 between IPv6 layer and IPv4 layer,
280 and to cope with ingress filtering rule on the other side.
281 This is a feature to make
283 work right for all occasions.