summaryrefslogtreecommitdiff
path: root/sbin/ipsec/ipsecadm/ipsecadm.1
blob: ae0e0394506049dcff7cf3282fe76bdd2a8dba37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
.\" $OpenBSD: ipsecadm.1,v 1.9 1998/05/19 13:33:19 provos Exp $
.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
.\" 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, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"      This product includes software developed by Niels Provos.
.\" 4. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" Manual page, using -mandoc macros
.\"
.Dd August 26, 1997
.Dt IPSECADM 1
.Os
.Sh NAME
.Nm ipsecadm
.Nd interface to setup IPSec
.Sh SYNOPSIS
.Nm ipsecadm
.Op command
.Ar modifiers ...
.Sh DESCRIPTION
The
.Nm ipsecadm
utility allows to setup security associations in the kernel
to be used with 
.Xr ipsec 4 .
It can be used to specify the encryption and authentication
algorithms and key material for the network layer security
provided by IPSec.
The possible commands are:
.Pp
.Bl -tag -width new_esp
.It new esp
Setup a SPI which uses the new esp transforms.
Encryption and authentication algorithms can be applied. 
This is the default mode.
Allowed
modifiers are:
.Fl dst ,
.Fl src ,
.Fl spi ,
.Fl tunnel ,
.Fl enc ,
.Fl auth ,
.Fl iv ,
.Fl newpadding ,
.Fl authkey ,
and
.Fl key .
.It old esp
Setup a SPI which uses the old esp transforms. Only
encryption algorithms can be applied. Allowed modifiers are:
.Fl dst ,
.Fl src ,
.Fl spi ,
.Fl tunnel ,
.Fl enc ,
.Fl iv 
and
.Fl key .
.It new ah
Setup a SPI which uses the new ah transforms. Authentication
will be done with HMAC using the specified hash algorithm. Allowed modifiers
are:
.Fl dst ,
.Fl src ,
.Fl spi ,
.Fl tunnel ,
.Fl auth ,
and
.Fl key .
.It old ah
Setup a SPI which uses the old ah transforms. Simple keyed
hashes will be used for authentication. Allowed modifiers are:
.Fl dst ,
.Fl src ,
.Fl spi ,
.Fl tunnel ,
.Fl auth ,
and
.Fl key .
.It delspi
The specified SA will be deleted. A SA consists of the
destination address, SPI and security protocol. Allowed modifiers are:
.Fl dst ,
.Fl spi ,
.Fl proto .
and
.Fl chain .
.It group
Group two SA's together. Allowed modifiers are:
.Fl dst ,
.Fl spi ,
.Fl proto ,
.Fl dst2 ,
.Fl spi2 ,
and
.Fl proto2 .
.El
.Pp
The modifiers have the following meanings: 
.Bl -tag -width newpadding -offset indent
.It src
The source IP address for the SPI.
.It dst
The destination IP address for the SPI.
.It spi
The unique Security Parameter Index (SPI).
.It tunnel
The source and destination IP addresses for the external IP header.
.It newpadding
For new ESP, specify new style self-describing padding should be used. Ignored everywhere else.
.It enc
The encryption algorithm to be used with the SPI. Possible values
are:
.Nm des 
and
.Nm 3des
for both old and new esp.
Blowfish encryption
.Nm blf
and
.Nm cast
can only be used with new esp.
.It auth
The authentication algorithm to be used with the SPI. Possible values
are:
.Nm md5
and
.Nm sha1
for both old and new ah and also new esp. Also
.Nm rmd160
for both new ah and esp.
.It key
The secret symmetric key used for encryption and authentication. The size
for 
.Nm des
and
.Nm 3des
is fixed to 8 and 24 respectivly. For other ciphers like
.Nm cast
or
.Nm blf
the key length can be variable.
.It authkey
The secret key material used for authentication 
if additional authentication in new esp mode is required. For
old or new ah the key material for authentication is passed with the
.Nm key
option.
.It iv
The initialization vector used for encryption. In old esp mode you need
to specify it as either four or eight byte long value. In new esp mode
the iv has to be eight bytes for
.Nm cast
and
.Nm blf .
The other transforms can either use an eight byte iv or will derive one 
when none is specified with
.Xr ipsecadm 1 .
.It proto
The security protocol needed by
.Nm delspi
or
.Nm group
to uniquely specifiy the SA. 
The default value is 50 which means
.Nm IPPROTO_ESP .
.It chain
Delete the whole SPI chain, otherwise delete only the SPI given.
.It dst2
The second IP destination address used by
.Nm group .
.It spi2
The second SPI used by
.Nm group .
.It proto2
The second security protocol used by
.Nm group .
.El
.Sh EXAMPLE
Setup a SPI which uses new esp with 3des encryption and HMAC-SHA1
authentication:
.Pp
ipsecadm -enc 3des -auth sha1 -spi 1001 -dst 169.20.12.2 -src 169.20.12.3
-key 638063806380638063806380638063806380638063806380 -authp 1234123412341234
.Pp
Setup a SPI for authentication with old ah only:
.Pp
ipsecadm old ah -auth md5 -spi 1001 -dst 169.20.12.2 -src 169.20.12.3 
-key 12341234deadbeef
.Sh SEE ALSO
.Xr ipsec 4 ,
.Xr photurisd 8 .