OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / klips / utils / eroute.8
1 .TH IPSEC_EROUTE 8 "21 Jun 2000"
2 .\"
3 .\" RCSID $Id: eroute.8,v 1.24 2001/02/26 19:58:49 rgb Exp $
4 .\"
5 .SH NAME
6 ipsec eroute \- manipulate IPSEC extended routing tables
7 .SH SYNOPSIS
8 .B ipsec
9 .B eroute
10 .PP
11 .B ipsec
12 .B eroute
13 .B \-\-add
14 .B \-\-eraf (inet | inet6)
15 .B \-\-src
16 src/srcmaskbits|srcmask
17 .B \-\-dst
18 dst/dstmaskbits|dstmask
19 <SAID>
20 .PP
21 .B ipsec
22 .B eroute
23 .B \-\-replace
24 .B \-\-eraf (inet | inet6)
25 .B \-\-src
26 src/srcmaskbits|srcmask
27 .B \-\-dst
28 dst/dstmaskbits|dstmask
29 <SAID>
30 .PP
31 .B ipsec
32 .B eroute
33 .B \-\-del
34 .B \-\-eraf (inet | inet6)
35 .B \-\-src
36 src/srcmaskbits|srcmask
37 .B \-\-dst
38 dst/dstmaskbits|dstmask
39 .PP
40 .B ipsec
41 .B eroute
42 .B \-\-clear
43 .PP
44 .B ipsec
45 .B eroute
46 .B \-\-help
47 .PP
48 .B ipsec
49 .B eroute
50 .B \-\-version
51 .PP
52 Where <SAID> is
53 .B \-\-af
54 (inet | inet6)
55 .B \-\-edst
56 edst
57 .B \-\-spi
58 spi
59 .B \-\-proto
60 proto
61 OR
62 .B \-\-said
63 said
64 OR
65 .B \-\-said
66 .B (%passthrough | %passthrough4 | %passthrough6)
67 .SH DESCRIPTION
68 .I Eroute
69 manages the IPSEC extended routing tables,
70 which control what (if any) processing is applied
71 to non-encrypted packets arriving for IPSEC processing and forwarding.
72 The form with no additional arguments lists the contents of
73 /proc/net/ipsec_eroute.
74 The
75 .B \-\-add
76 form adds a table entry, the
77 .B \-\-replace
78 form replaces a table entry, while the
79 .B \-\-del
80 form deletes one.  The
81 .B \-\-clear
82 form deletes the entire table.
83 .PP
84 A table entry consists of:
85 .IP + 3
86 source and destination addresses,
87 with masks,
88 for selection of packets
89 .IP +
90 Security Association IDentifier, comprised of:
91 .IP + 6
92 protocol
93 (\fIproto\fR), indicating (together with the
94 effective destination and the security parameters index)
95 which Security Association should be used to process the packet
96 .IP +
97 address family
98 (\fIaf\fR),
99 .IP +
100 Security Parameters Index
101 (\fIspi\fR), indicating (together with the
102 effective destination and protocol)
103 which Security Association should be used to process the packet
104 (must be larger than or equal to 0x100)
105 .IP +
106 effective destination
107 (\fIedst\fR),
108 where the packet should be forwarded after processing
109 (normally the other security gateway)
110 .IP + 3
111 OR
112 .IP + 6
113 SAID
114 (\fIsaid\fR), indicating 
115 which Security Association should be used to process the packet
116 .PP
117 Addresses are written as IPv4 dotted quads or IPv6 coloned hex,
118 protocol is one of "ah", "esp", "comp" or "tun" and SPIs are
119 prefixed hexadecimal numbers where '.' represents IPv4 and ':'
120 stands for IPv6.
121 .PP
122 SAIDs are written as "protoafSPI@address".  There are also 5
123 "magic" SAIDs which have special meaning:
124 .IP + 3
125 .B %drop
126 means that matches are to be dropped
127 .IP +
128 .B %reject
129 means that matches are to be dropped and an ICMP returned, if
130 possible to inform
131 .IP +
132 .B %trap
133 means that matches are to trigger an ACQUIRE message to the Key
134 Management daemon(s) and a hold eroute will be put in place to
135 prevent subsequent packets also triggering ACQUIRE messages.
136 .IP +
137 .B %hold
138 means that matches are to stored until the eroute is replaced or
139 until that eroute gets reaped
140 .IP +
141 .B %pass
142 means that matches are to allowed to pass without IPSEC processing
143 .PP
144 The format of /proc/net/ipsec_eroute is listed in ipsec_eroute(5).
145 .br
146 .ne 5
147 .SH EXAMPLES
148 .LP
149 .B "ipsec eroute \-\-add \-\-eraf inet \-\-src 192.168.0.1/32 \e"
150 .br
151 .B "   \-\-dst 192.168.2.0/24 \-\-af inet \-\-edst 192.168.0.2 \e"
152 .br
153 .B "   \-\-spi 0x135 \-\-proto tun"
154 .LP
155 sets up an
156 .BR eroute
157 on a Security Gateway to protect traffic between the host
158 .BR 192.168.0.1
159 and the subnet
160 .BR 192.168.2.0
161 with
162 .BR 24
163 bits of subnet mask via Security Gateway
164 .BR 192.168.0.2
165 using the Security Association with address
166 .BR 192.168.0.2 ,
167 Security Parameters Index
168 .BR 0x135
169 and protocol
170 .BR tun
171 (50, IPPROTO_ESP).
172 .LP
173 .B "ipsec eroute \-\-add \-\-eraf inet6 \-\-src 3049:1::1/128 \e"
174 .br
175 .B "   \-\-dst 3049:2::/64 \-\-af inet6 \-\-edst 3049:1::2 \e"
176 .br
177 .B "   \-\-spi 0x145 \-\-proto tun"
178 .LP
179 sets up an
180 .BR eroute
181 on a Security Gateway to protect traffic between the host
182 .BR 3049:1::1
183 and the subnet
184 .BR 3049:2::
185 with
186 .BR 64
187 bits of subnet mask via Security Gateway
188 .BR 3049:1::2
189 using the Security Association with address
190 .BR 3049:1::2 ,
191 Security Parameters Index
192 .BR 0x145
193 and protocol
194 .BR tun
195 (50, IPPROTO_ESP).
196 .LP
197 .B "ipsec eroute \-\-replace \-\-eraf inet \-\-src company.com/24 \e"
198 .br
199 .B "   \-\-dst ftp.ngo.org/32 \-\-said tun.135@gw.ngo.org"
200 .LP
201 replaces an
202 .BR eroute
203 on a Security Gateway to protect traffic between the subnet
204 .BR company.com 
205 with
206 .BR 24
207 bits of subnet mask and the host
208 .BR ftp.ngo.org
209 via Security Gateway
210 .BR gw.ngo.org
211 using the Security Association with Security Association ID
212 .BR tun0x135@gw.ngo.org
213 .LP
214 .B "ipsec eroute \-\-del \-\-eraf inet \-\-src company.com/24 \e"
215 .br
216 .B "   \-\-dst www.ietf.org/32 \-\-said %passthrough4"
217 .LP
218 deletes an
219 .BR eroute
220 on a Security Gateway that allowed traffic between the subnet
221 .BR company.com 
222 with
223 .BR 24
224 bits of subnet mask and the host
225 .BR www.ietf.org
226 to pass in the clear, unprocessed.
227 .SH FILES
228 /proc/net/ipsec_eroute, /usr/local/bin/ipsec
229 .SH "SEE ALSO"
230 ipsec(8), ipsec_manual(8), ipsec_tncfg(8), ipsec_spi(8),
231 ipsec_spigrp(8), ipsec_klipsdebug(8), ipsec_eroute(5)
232 .SH HISTORY
233 Written for the Linux FreeS/WAN project
234 <http://www.freeswan.org/>
235 by Richard Guy Briggs.
236 .\"
237 .\" $Log: eroute.8,v $
238 .\" Revision 1.24  2001/02/26 19:58:49  rgb
239 .\" Added a comment on the restriction of spi > 0x100.
240 .\" Implement magic SAs %drop, %reject, %trap, %hold, %pass as part
241 .\" of the new SPD and to support opportunistic.
242 .\"
243 .\" Revision 1.23  2000/09/17 18:56:48  rgb
244 .\" Added IPCOMP support.
245 .\"
246 .\" Revision 1.22  2000/09/13 15:54:31  rgb
247 .\" Added Gerhard's ipv6 updates.
248 .\"
249 .\" Revision 1.21  2000/06/30 18:21:55  rgb
250 .\" Update SEE ALSO sections to include ipsec_version(5) and ipsec_pf_key(5)
251 .\" and correct FILES sections to no longer refer to /dev/ipsec which has
252 .\" been removed since PF_KEY does not use it.
253 .\"
254 .\" Revision 1.20  2000/06/21 16:54:57  rgb
255 .\" Added 'no additional args' text for listing contents of
256 .\" /proc/net/ipsec_* files.
257 .\"
258 .\" Revision 1.19  1999/07/19 18:47:24  henry
259 .\" fix slightly-misformed comments
260 .\"
261 .\" Revision 1.18  1999/04/06 04:54:37  rgb
262 .\" Fix/Add RCSID Id: and Log: bits to make PHMDs happy.  This includes
263 .\" patch shell fixes.
264 .\"
265 .\"