summaryrefslogtreecommitdiff
path: root/sbin/ipsecctl/ipsec.conf.5
blob: 4048a8d534a58e88753519099917f27fcbdadf5d (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
.\"	$OpenBSD: ipsec.conf.5,v 1.8 2005/04/10 14:02:45 jmc Exp $
.\"
.\" Copyright (c) 2004 Mathieu Sauve-Frankel  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.
.\"
.\" 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.
.\"
.Dd April 9, 2005
.Dt IPSEC.CONF 5
.Os
.Sh NAME
.Nm ipsec.conf
.Nd IPsec configuration file
.Sh DESCRIPTION
The
.Xr ipsec 4
protocol suite provides security services for IP according to rules or
definitions specified in
.Nm .
.Sh FLOWS
IPsec uses
.Em flows
to determine whether to apply security services to an IP packet or not.
The following security services are available:
.Bl -tag -width xxxx
.It Ic flow esp
ESP can provide the following properties:
authentication, integrity, replay protection, and confidentiality of the data.
.It Ic flow ah
AH provides authentication, integrity, and replay protection, but no
confidentiality.
.El
.Pp
For details on ESP and AH see
.Xr ipsec 4 .
When no service is specified,
.Xr ipsecctl 8
will use ESP.
The settings for the security services have to be negotiated by
.Xr isakmpd 8 .
As soon as a packet matches a flow,
.Xr isakmpd 8
automatically starts the negotiation.
See
.Xr isakmpd 8
for details.
.Pp
Parameters specify the packets to which a flow applies.
Some parameters are optional.
.Bl -tag -width xxxx
.It Ar in No or Ar out
This rule applies to incoming or outgoing packets.
If neither
.Ar in
nor
.Ar out
are specified,
.Xr ipsecctl 8
will assume the direction
.Ar out
for this rule and will construct a proper
.Ar in
rule.
Thus packets in both directions will be matched.
.It Xo
.Ar from
.Aq Ar src
.Ar to
.Aq Ar dst
.Ar peer
.Aq Ar remote
.Xc
This rule applies for packets with source address
.Aq Ar src
and destination address
.Aq Ar dst .
All addresses are specified in CIDR notation.
The
.Ar peer
parameter specifies the address of the remote endpoint of this particular
flow.
For host-to-host connections where
.Aq Ar dst
is identical to
.Aq Ar remote ,
the
.Ar peer
specification can be left out.
.El
.Sh EXAMPLES
.Bd -literal
# Host-to-host
flow esp from 192.168.3.14 to 192.168.3.100

# Same as above, but explicitly specifying "in" and "out" rules
flow esp out from 192.168.3.14  to 192.168.3.100
flow esp in  from 192.168.3.100 to 192.168.3.14

# Net-to-net
flow esp from 192.168.7.0/24 to 192.168.8.0/24 peer 192.168.3.12

# Same as above, but explicitly specifying "in" and "out" rules
flow esp out from 192.168.7.0/24 to 192.168.8.0/24 peer 192.168.3.12
flow esp in  from 192.168.8.0/24 to 192.168.7.0/24 peer 192.168.3.12
.Ed
.Sh SEE ALSO
.Xr ipsec 4 ,
.Xr isakmpd.conf 5 ,
.Xr ipsecctl 8 ,
.Xr isakmpd 8
.Sh HISTORY
The
.Nm
file format first appeared in
.Ox 3.8 .