]> git.ipfire.org Git - people/ms/strongswan.git/blame - doc/manpage.d/ipsec_pluto.8.html
(no commit message)
[people/ms/strongswan.git] / doc / manpage.d / ipsec_pluto.8.html
CommitLineData
997358a6
MW
1Content-type: text/html
2
3<HTML><HEAD><TITLE>Manpage of IPSEC_PLUTO</TITLE>
4</HEAD><BODY>
5<H1>IPSEC_PLUTO</H1>
6Section: Maintenance Commands (8)<BR>Updated: 28 March 1999<BR><A HREF="#index">Index</A>
7<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
8
9<A NAME="lbAB">&nbsp;</A>
10<H2>NAME</H2>
11
12ipsec pluto - IPsec IKE keying daemon
13<BR>
14
15ipsec whack - control interface for IPSEC keying daemon
16<A NAME="lbAC">&nbsp;</A>
17<H2>SYNOPSIS</H2>
18
19
20
21<DL COMPACT>
22<DT>
23<B>
24<DD>ipsec pluto
25[--help]
26[--version]
27[--optionsfrom&nbsp;</B><I>filename</I>]
28[--nofork]
29[--stderrlog]
30[--noklips]
31[--uniqueids]
32[<B>--interface</B> <I>interfacename</I>]
33[--ikeport&nbsp;<I>portnumber</I>]
34[--ctlbase&nbsp;<I>path</I>]
35[--secretsfile&nbsp;<I>secrets-file</I>]
36[--adns <I>pathname</I>]
37[--lwdnsq <I>pathname</I>]
38[--perpeerlog]
39[--perpeerlogbase&nbsp;<I>dirname</I>]
40[--debug-none]
41[--debug-all]
42[--debug-raw]
43[--debug-crypt]
44[--debug-parsing]
45[--debug-emitting]
46[--debug-control]
47[--debug-lifecycle]
48[--debug-klips]
49[--debug-dns]
50[--debug-oppo]
51[--debug-private]
52<DT>
53<B>
54<DD>ipsec whack
55[--help]
56[--version]
57<DT>
58
59<DD>ipsec whack
60--name&nbsp;</B><I>connection-name</I>
61<BR>
62
63[--id&nbsp;<I>id</I>] [--host&nbsp;<I>ip-address</I>]
64[--ikeport&nbsp;<I>port-number</I>]
65[--nexthop&nbsp;<I>ip-address</I>]
66[--client&nbsp;<I>subnet</I>]
67[--dnskeyondemand]
68[--updown&nbsp;<I>updown</I>]
69<BR>
70
71--to
72<BR>
73
74[--id&nbsp;<I>id</I>]
75[--host&nbsp;<I>ip-address</I>]
76[--ikeport&nbsp;<I>port-number</I>]
77[--nexthop&nbsp;<I>ip-address</I>]
78[--client&nbsp;<I>subnet</I>]
79[--dnskeyondemand]
80[--updown&nbsp;<I>updown</I>]
81<BR>
82
83[--psk]
84[--rsasig]
85[--encrypt]
86[--authenticate]
87[--compress]
88[--tunnel]
89[--pfs]
90[--disablearrivalcheck]
91[--ipv4]
92[--ipv6]
93[--tunnelipv4]
94[--tunnelipv6]
95[--ikelifetime&nbsp;<I>seconds</I>]
96[--ipseclifetime&nbsp;<I>seconds</I>]
97[--rekeymargin&nbsp;<I>seconds</I>]
98[--rekeyfuzz&nbsp;<I>percentage</I>]
99[--keyingtries&nbsp;<I>count</I>]
100[--dontrekey]
101[--delete]
102[--ctlbase&nbsp;<I>path</I>]
103[--optionsfrom&nbsp;<I>filename</I>]
104[--label&nbsp;<I>string</I>]
105<DT>
106<B>
107<DD>ipsec whack
108--keyid&nbsp;</B><I>id</I>
109[--addkey]
110[--pubkeyrsa&nbsp;<I>key</I>]
111[--ctlbase&nbsp;<I>path</I>]
112[--optionsfrom&nbsp;<I>filename</I>]
113[--label&nbsp;<I>string</I>]
114<DT>
115<B>
116<DD>ipsec whack
117--myid&nbsp;</B><I>id</I>
118<DT>
119<B>
120<DD>ipsec whack
121--listen|--unlisten
122[--ctlbase&nbsp;</B><I>path</I>]
123[--optionsfrom&nbsp;<I>filename</I>]
124[--label&nbsp;<I>string</I>]
125<DT>
126<B>
127<DD>ipsec whack
128--route|--unroute
129--name&nbsp;</B><I>connection-name</I>
130[--ctlbase&nbsp;<I>path</I>]
131[--optionsfrom&nbsp;<I>filename</I>]
132[--label&nbsp;<I>string</I>]
133<DT>
134<B>
135<DD>ipsec whack
136--initiate|--terminate
137--name&nbsp;</B><I>connection-name</I>
138[--asynchronous]
139[--ctlbase&nbsp;<I>path</I>]
140[--optionsfrom&nbsp;<I>filename</I>]
141[--label&nbsp;<I>string</I>]
142<DT>
143<B>
144<DD>ipsec whack
145[--tunnelipv4]
146[--tunnelipv6]
147--oppohere </B><I>ip-address</I>
148--oppothere <I>ip-address</I>
149<DT>
150<B>
151<DD>ipsec whack
152--delete
153--name&nbsp;</B><I>connection-name</I>
154[--ctlbase&nbsp;<I>path</I>]
155[--optionsfrom&nbsp;<I>filename</I>]
156[--label&nbsp;<I>string</I>]
157<DT>
158<B>
159<DD>ipsec whack
160--deletestate&nbsp;</B><I>state-number</I>
161[--ctlbase&nbsp;<I>path</I>]
162[--optionsfrom&nbsp;<I>filename</I>]
163[--label&nbsp;<I>string</I>]
164<DT>
165<B>
166<DD>ipsec whack
167[--name&nbsp;</B><I>connection-name</I>]
168[--debug-none]
169[--debug-all]
170[--debug-raw]
171[--debug-crypt]
172[--debug-parsing]
173[--debug-emitting]
174[--debug-control]
175[--debug-lifecycle]
176[--debug-klips]
177[--debug-dns]
178[--debug-oppo]
179[--debug-private]
180[--ctlbase&nbsp;<I>path</I>]
181[--optionsfrom&nbsp;<I>filename</I>]
182[--label&nbsp;<I>string</I>]
183<DT>
184<B>
185<DD>ipsec whack
186--status
187[--ctlbase&nbsp;</B><I>path</I>]
188[--optionsfrom&nbsp;<I>filename</I>]
189[--label&nbsp;<I>string</I>]
190<DT>
191<B>
192<DD>ipsec whack
193--shutdown
194[--ctlbase&nbsp;</B><I>path</I>]
195[--optionsfrom&nbsp;<I>filename</I>]
196[--label&nbsp;<I>string</I>]
197
198
199
200</DL>
201<A NAME="lbAD">&nbsp;</A>
202<H2>DESCRIPTION</H2>
203
204<B>pluto</B>
205
206is an IKE (``IPsec Key Exchange'') daemon.
207<B>whack</B>
208
209is an auxiliary program to allow requests to be made to a running
210<B>pluto</B>.
211
212<P>
213
214<B>pluto</B>
215
216is used to automatically build shared ``security associations'' on a
217system that has IPsec, the secure IP protocol.
218In other words,
219<B>pluto</B>
220
221can eliminate much of the work of manual keying.
222The actual
223secure transmission of packets is the responsibility of other parts of
224the system (see
225<B>KLIPS</B>,
226
227the companion implementation of IPsec).
228<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) provides a more convenient interface to
229<B>pluto</B> and <B>whack</B>.
230<A NAME="lbAE">&nbsp;</A>
231<H3>IKE's Job</H3>
232
233<P>
234
235A <I>Security Association</I> (<I>SA</I>) is an agreement between two network nodes on
236how to process certain traffic between them. This processing involves
237encapsulation, authentication, encryption, or compression.
238<P>
239
240IKE can be deployed on a network node to negotiate Security
241Associations for that node. These IKE implementations can only
242negotiate with other IKE implementations, so IKE must be on each node
243that is to be an endpoint of an IKE-negotiated Security Association.
244No other nodes need to be running IKE.
245<P>
246
247An IKE instance (i.e. an IKE implementation on a particular network
248node) communicates with another IKE instance using UDP IP packets, so
249there must be a route between the nodes in each direction.
250<P>
251
252The negotiation of Security Associations requires a number of choices
253that involve tradeoffs between security, convenience, trust, and
254efficiency. These are policy issues and are normally specified to the
255IKE instance by the system administrator.
256<P>
257
258IKE deals with two kinds of Security Associations. The first part of
259a negotiation between IKE instances is to build an ISAKMP SA. An
260ISAKMP SA is used to protect communication between the two IKEs.
261IPsec SAs can then be built by the IKEs - these are used to carry
262protected IP traffic between the systems.
263<P>
264
265The negotiation of the ISAKMP SA is known as Phase 1. In theory,
266Phase 1 can be accomplished by a couple of different exchange types,
267but we only implement one called Main Mode (we don't implement
268Aggressive Mode).
269<P>
270
271Any negotiation under the protection of an ISAKMP SA, including the
272negotiation of IPsec SAs, is part of Phase 2. The exchange type
273that we use to negotiate an IPsec SA is called Quick Mode.
274<P>
275
276IKE instances must be able to authenticate each other as part of their
277negotiation of an ISAKMP SA. This can be done by several mechanisms
278described in the draft standards.
279<P>
280
281IKE negotiation can be initiated by any instance with any other. If
282both can find an agreeable set of characteristics for a Security
283Association, and both recognize each others authenticity, they can set
284up a Security Association. The standards do not specify what causes
285an IKE instance to initiate a negotiation.
286<P>
287
288In summary, an IKE instance is prepared to automate the management of
289Security Associations in an IPsec environment, but a number of issues
290are considered policy and are left in the system administrator's hands.
291<A NAME="lbAF">&nbsp;</A>
292<H3>Pluto</H3>
293
294<P>
295
296<B>pluto</B> is an implementation of IKE. It runs as a daemon on a network
297node. Currently, this network node must be a LINUX system running the
298<B>KLIPS</B> implementation of IPsec.
299<P>
300
301<B>pluto</B> only implements a subset of IKE. This is enough for it to
302interoperate with other instances of <B>pluto</B>, and many other IKE
303implementations. We are working on implementing more of IKE.
304<P>
305
306The policy for acceptable characteristics for Security Associations is
307mostly hardwired into the code of <B>pluto</B> (spdb.c). Eventually
308this will be moved into a security policy database with reasonable
309expressive power and more convenience.
310<P>
311
312<B>pluto</B> uses shared secrets or RSA signatures to authenticate
313peers with whom it is negotiating.
314<P>
315
316<B>pluto</B> initiates negotiation of a Security Association when it is
317manually prodded: the program <B>whack</B> is run to trigger this.
318It will also initiate a negotiation when <B>KLIPS</B> traps an outbound packet
319for Opportunistic Encryption.
320<P>
321
322<B>pluto</B> implements ISAKMP SAs itself. After it has negotiated the
323characteristics of an IPsec SA, it directs <B>KLIPS</B> to implement it.
324It also invokes a script to adjust any firewall and issue <I><A HREF="route.8.html">route</A></I>(8)
325commands to direct IP packets through <B>KLIPS</B>.
326<P>
327
328When <B>pluto</B> shuts down, it closes all Security Associations.
329<A NAME="lbAG">&nbsp;</A>
330<H3>Before Running Pluto</H3>
331
332<P>
333
334<B>pluto</B> runs as a daemon with userid root. Before running it, a few
335things must be set up.
336<P>
337
338<B>pluto</B> requires <B>KLIPS</B>, the FreeS/WAN implementation of IPsec.
339All of the components of <B>KLIPS</B> and <B>pluto</B> should be installed.
340<P>
341
342<B>pluto</B> supports multiple public networks (that is, networks
343that are considered insecure and thus need to have their traffic
344encrypted or authenticated). It discovers the
345public interfaces to use by looking at all interfaces that are
346configured (the <B>--interface</B> option can be used to limit
347the interfaces considered).
348It does this only when <B>whack</B> tells it to --listen,
349so the interfaces must be configured by then. Each interface with a name of the form
350<B>ipsec</B>[<B>0</B>-<B>9</B>] is taken as a <B>KLIPS</B> virtual public interface.
351Another network interface with the same IP address (there should be only
352one) is taken as the corresponding real public
353interface. <I><A HREF="ifconfig.8.html">ifconfig</A></I>(8) with the <B>-a</B> flag will show
354the name and status of each network interface.
355<P>
356
357<B>pluto</B> requires a database of preshared secrets and RSA private keys.
358This is described in the
359<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
360
361<B>pluto</B> is told of RSA public keys via <B>whack</B> commands.
362If the connection is Opportunistic, and no RSA public key is known,
363<B>pluto</B> will attempt to fetch RSA keys using the Domain Name System.
364<A NAME="lbAH">&nbsp;</A>
365<H3>Setting up <B>KLIPS</B> for <B>pluto</B></H3>
366
367<P>
368
369The most basic network topology that <B>pluto</B> supports has two security
370gateways negotiating on behalf of client subnets. The diagram of RGB's
371testbed is a good example (see <I>klips/doc/rgb_setup.txt</I>).
372<P>
373
374The file <I>INSTALL</I> in the base directory of this distribution
375explains how to start setting up the whole system, including <B>KLIPS</B>.
376<P>
377
378Make sure that the security gateways have routes to each other. This
379is usually covered by the default route, but may require issuing
380<I><A HREF="route.8.html">route</A></I>(8)
381
382commands. The route must go through a particular IP
383interface (we will assume it is <I>eth0</I>, but it need not be). The
384interface that connects the security gateway to its client must be a
385different one.
386<P>
387
388It is necessary to issue a
389<I><A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A></I>(8)
390
391command on each gateway. The required command is:
392<P>
393&nbsp;&nbsp;&nbsp;ipsec tncfg --attach&nbsp;--virtual&nbsp;ipsec0 --physical&nbsp;eth0
394<P>
395A command to set up the ipsec0 virtual interface will also need to be
396run. It will have the same parameters as the command used to set up
397the physical interface to which it has just been connected using
398<I><A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A></I>(8).
399
400<A NAME="lbAI">&nbsp;</A>
401<H3>ipsec.secrets file</H3>
402
403<P>
404
405A <B>pluto</B> daemon and another IKE daemon (for example, another instance
406of <B>pluto</B>) must convince each other that they are who they are supposed
407to be before any negotiation can succeed. This authentication is
408accomplished by using either secrets that have been shared beforehand
409(manually) or by using RSA signatures. There are other techniques,
410but they have not been implemented in <B>pluto</B>.
411<P>
412
413The file <I>/etc/ipsec.secrets</I> is used to keep preshared secret keys
414and RSA private keys for
415authentication with other IKE daemons. For debugging, there is an
416argument to the <B>pluto</B> command to use a different file.
417This file is described in
418<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
419
420<A NAME="lbAJ">&nbsp;</A>
421<H3>Running Pluto</H3>
422
423<P>
424
425To fire up the daemon, just type <B>pluto</B> (be sure to be running as
426the superuser).
427The default IKE port number is 500, the UDP port assigned by IANA for IKE Daemons.
428<B>pluto</B> must be run by the superuser to be able to use the UDP 500 port.
429<P>
430
431<B>pluto</B> attempts to create a lockfile with the name
432<I>/var/run/pluto.pid</I>. If the lockfile cannot be created,
433<B>pluto</B> exits - this prevents multiple <B>pluto</B>s from
434competing Any ``leftover'' lockfile must be removed before
435<B>pluto</B> will run. <B>pluto</B> writes its pid into this file so
436that scripts can find it. This lock will not function properly if it
437is on an NFS volume (but sharing locks on multiple machines doesn't
438make sense anyway).
439<P>
440
441<B>pluto</B> then forks and the parent exits. This is the conventional
442``daemon fork''. It can make debugging awkward, so there is an option
443to suppress this fork.
444<P>
445
446All logging, including diagnostics, is sent to
447<I><A HREF="syslog.3.html">syslog</A></I>(3)
448
449with facility=authpriv;
450it decides where to put these messages (possibly in /var/log/secure).
451Since this too can make debugging awkward, there is an option to
452steer logging to stderr.
453<P>
454
455If the <B>--perpeerlog</B> option is given, then pluto will open
456a log file per connection. By default, this is in /var/log/pluto/peer,
457in a subdirectory formed by turning all dot (.) [IPv4} or colon (:)
458[IPv6] into slashes (/).
459<P>
460
461The base directory can be changed with the <B>--perpeerlogbase</B>.
462<P>
463
464Once <B>pluto</B> is started, it waits for requests from <B>whack</B>.
465<A NAME="lbAK">&nbsp;</A>
466<H3>Pluto's Internal State</H3>
467
468<P>
469
470To understand how to use <B>pluto</B>, it is helpful to understand a little
471about its internal state. Furthermore, the terminology is needed to decipher
472some of the diagnostic messages.
473<P>
474
475The <I>(potential) connection</I> database describes attributes of a
476connection. These include the IP addresses of the hosts and client
477subnets and the security characteristics desired. <B>pluto</B>
478requires this information (simply called a connection) before it can
479respond to a request to build an SA. Each connection is given a name
480when it is created, and all references are made using this name.
481<P>
482
483During the IKE exchange to build an SA, the information about the
484negotiation is represented in a <I>state object</I>. Each state object
485reflects how far the negotiation has reached. Once the negotiation is
486complete and the SA established, the state object remains to represent
487the SA. When the SA is terminated, the state object is discarded.
488Each State object is given a serial number and this is used to refer
489to the state objects in logged messages.
490<P>
491
492Each state object corresponds to a connection and can be thought of
493as an instantiation of that connection.
494At any particular time, there may be any number of state objects
495corresponding to a particular connection.
496Often there is one representing an ISAKMP SA and another representing
497an IPsec SA.
498<P>
499
500<B>KLIPS</B> hooks into the routing code in a LINUX kernel.
501Traffic to be processed by an IPsec SA must be directed through
502<B>KLIPS</B> by routing commands. Furthermore, the processing to be
503done is specified by <I>ipsec <A HREF="eroute.8.html">eroute</A>(8)</I> commands.
504<B>pluto</B> takes the responsibility of managing both of these special
505kinds of routes.
506<P>
507
508Each connection may be routed, and must be while it has an IPsec SA.
509The connection specifies the characteristics of the route: the
510interface on this machine, the ``gateway'' (the nexthop),
511and the peer's client subnet. Two
512connections may not be simultaneously routed if they are for the same
513peer's client subnet but use different interfaces or gateways
514(<B>pluto</B>'s logic does not reflect any advanced routing capabilities).
515<P>
516
517Each eroute is associated with the state object for an IPsec SA
518because it has the particular characteristics of the SA.
519Two eroutes conflict if they specify the identical local
520and remote clients (unlike for routes, the local clients are
521taken into account).
522<P>
523
524When <B>pluto</B> needs to install a route for a connection,
525it must make sure that no conflicting route is in use. If another
526connection has a conflicting route, that route will be taken down, as long
527as there is no IPsec SA instantiating that connection.
528If there is such an IPsec SA, the attempt to install a route will fail.
529<P>
530
531There is an exception. If <B>pluto</B>, as Responder, needs to install
532a route to a fixed client subnet for a connection, and there is
533already a conflicting route, then the SAs using the route are deleted
534to make room for the new SAs. The rationale is that the new
535connection is probably more current. The need for this usually is a
536product of Road Warrior connections (these are explained later; they
537cannot be used to initiate).
538<P>
539
540When <B>pluto</B> needs to install an eroute for an IPsec SA (for a
541state object), first the state object's connection must be routed (if
542this cannot be done, the eroute and SA will not be installed).
543If a conflicting eroute is already in place for another connection,
544the eroute and SA will not be installed (but note that the routing
545exception mentioned above may have already deleted potentially conflicting SAs).
546If another IPsec
547SA for the same connection already has an eroute, all its outgoing traffic
548is taken over by the new eroute. The incoming traffic will still be
549processed. This characteristic is exploited during rekeying.
550<P>
551
552All of these routing characteristics are expected change when
553<B>KLIPS</B> is modified to use the firewall hooks in the LINUX 2.4.x
554kernel.
555<A NAME="lbAL">&nbsp;</A>
556<H3>Using Whack</H3>
557
558<P>
559
560<B>whack</B> is used to command a running <B>pluto</B>.
561<B>whack</B> uses a UNIX domain socket to speak to <B>pluto</B>
562(by default, <I>/var/pluto.ctl</I>).
563<P>
564
565<B>whack</B> has an intricate argument syntax.
566This syntax allows many different functions to be specified.
567The help form shows the usage or version information.
568The connection form gives <B>pluto</B> a description of a potential connection.
569The public key form informs <B>pluto</B> of the RSA public key for a potential peer.
570The delete form deletes a connection description and all SAs corresponding
571to it.
572The listen form tells <B>pluto</B> to start or stop listening on the public interfaces
573for IKE requests from peers.
574The route form tells <B>pluto</B> to set up routing for a connection;
575the unroute form undoes this.
576The initiate form tells <B>pluto</B> to negotiate an SA corresponding to a connection.
577The terminate form tells <B>pluto</B> to remove all SAs corresponding to a connection,
578including those being negotiated.
579The status form displays the <B>pluto</B>'s internal state.
580The debug form tells <B>pluto</B> to change the selection of debugging output
581``on the fly''. The shutdown form tells
582<B>pluto</B> to shut down, deleting all SAs.
583<P>
584
585Most options are specific to one of the forms, and will be described
586with that form. There are three options that apply to all forms.
587<DL COMPACT>
588<DT><B>--ctlbase</B>&nbsp;<I>path</I><DD>
589<I>path</I>.ctl is used as the UNIX domain socket for talking
590to <B>pluto</B>.
591This option facilitates debugging.
592<DT><B>--optionsfrom</B>&nbsp;<I>filename</I><DD>
593adds the contents of the file to the argument list.
594<DT><B>--label</B>&nbsp;<I>string</I><DD>
595adds the string to all error messages generated by <B>whack</B>.
596</DL>
597<P>
598
599The help form of <B>whack</B> is self-explanatory.
600<DL COMPACT>
601<DT><B>--help</B><DD>
602display the usage message.
603<DT><B>--version</B><DD>
604display the version of <B>whack</B>.
605</DL>
606<P>
607
608The connection form describes a potential connection to <B>pluto</B>.
609<B>pluto</B> needs to know what connections can and should be negotiated.
610When <B>pluto</B> is the initiator, it needs to know what to propose.
611When <B>pluto</B> is the responder, it needs to know enough to decide whether
612is is willing to set up the proposed connection.
613<P>
614
615The description of a potential connection can specify a large number
616of details. Each connection has a unique name. This name will appear
617in a updown shell command, so it should not contain punctuation
618that would make the command ill-formed.
619<DL COMPACT>
620<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
621</DL>
622<P>
623
624The topology of
625a connection is symmetric, so to save space here is half a picture:
626<P>
627&nbsp;&nbsp;&nbsp;client_subnet&lt;--&gt;host:ikeport&lt;--&gt;nexthop&lt;---
628<P>
629A similar trick is used in the flags. The same flag names are used for
630both ends. Those before the <B>--to</B> flag describe the left side
631and those afterwards describe the right side. When <B>pluto</B> attempts
632to use the connection, it decides whether it is the left side or the right
633side of the connection, based on the IP numbers of its interfaces.
634<DL COMPACT>
635<DT><B>--id</B>&nbsp;<I>id</I><DD>
636the identity of the end. Currently, this can be an IP address (specified
637as dotted quad or as a Fully Qualified Domain Name, which will be resolved
638immediately) or as a Fully Qualified Domain Name itself (prefixed by ``@''
639to signify that it should not be resolved), or as <A HREF="mailto:user@FQDN">user@FQDN</A>, or as the
640magic value <B>%myid</B>.
641<B>Pluto</B> only authenticates the identity, and does not use it for
642addressing, so, for example, an IP address need not be the one to which
643packets are to be sent. If the option is absent, the
644identity defaults to the IP address specified by <B>--host</B>.
645<B>%myid</B> allows the identity to be separately specified (by the <B>pluto</B> or <B>whack</B> option <B>--myid</B>
646or by the <B><A HREF="ipsec.conf.5.html">ipsec.conf</A></B>(5) <B>config setup</B> parameter myid).
647Otherwise, <B>pluto</B> tries to guess what <B>%myid</B> should stand for:
648the IP address of <B>%defaultroute</B>, if it is supported by a suitable TXT record in the reverse domain for that IP address,
649or the system's hostname, if it is supported by a suitable TXT record in its forward domain.
650
651<DT><B>--host</B>&nbsp;<I>ip-address</I><DD>
652<DT><B>--host</B>&nbsp;<B>%any</B><DD>
653<DT><B>--host</B>&nbsp;<B>%opportunistic</B><DD>
654the IP address of the end (generally the public interface).
655If <B>pluto</B> is to act as a responder
656for IKE negotiations initiated from unknown IP addresses (the
657``Road Warrior'' case), the
658IP address should be specified as <B>%any</B> (currently,
659the obsolete notation <B>0.0.0.0</B> is also accepted for this).
660If <B>pluto</B> is to opportunistically initiate the connection,
661use <B>%opportunistic</B>
662<DT><B>--ikeport</B>&nbsp;<I>port-number</I><DD>
663the UDP port that IKE listens to on that host. The default is 500.
664(<B>pluto</B> on this machine uses the port specified by its own command
665line argument, so this only affects where <B>pluto</B> sends messages.)
666<DT><B>--nexthop</B>&nbsp;<I>ip-address</I><DD>
667where to route packets for the peer's client (presumably for the peer too,
668but it will not be used for this).
669When <B>pluto</B> installs an IPsec SA, it issues a route command.
670It uses the nexthop as the gateway.
671The default is the peer's IP address (this can be explicitly written as
672<B>%direct</B>; the obsolete notation <B>0.0.0.0</B> is accepted).
673This option is necessary if <B>pluto</B>'s host's interface used for sending
674packets to the peer is neither point-to-point nor directly connected to the
675peer.
676<DT><B>--client</B>&nbsp;<I>subnet</I><DD>
677the subnet for which the IPsec traffic will be destined. If not specified,
678the host will be the client.
679The subnet can be specified in any of the forms supported by <I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3).
680The general form is <I>address</I>/<I>mask</I>. The <I>address</I> can be either
681a domain name or four decimal numbers (specifying octets) separated by dots.
682The most convenient form of the <I>mask</I> is a decimal integer, specifying
683the number of leading one bits in the mask. So, for example, 10.0.0.0/8
684would specify the class A network ``Net 10''.
685<DT><B>--dnskeyondemand]</B><DD>
686specifies that when an RSA public key is needed to authenticate this
687host, and it isn't already known, fetch it from DNS.
688<DT><B>--updown</B>&nbsp;<I>updown</I><DD>
689specifies an external shell command to be run whenever <B>pluto</B>
690brings up or down a connection.
691The script is used to build a shell command, so it may contain positional
692parameters, but ought not to have punctuation that would cause the
693resulting command to be ill-formed.
694The default is <I>ipsec _updown</I>.
695<DT><B>--to</B><DD>
696separates the specification of the left and right ends of the connection.
697</DL>
698<P>
699
700The potential connection description also specifies characteristics of
701rekeying and security.
702<DL COMPACT>
703<DT><B>--psk</B><DD>
704Propose and allow preshared secret authentication for IKE peers. This authentication
705requires that each side use the same secret. May be combined with <B>--rsasig</B>;
706at least one must be specified.
707<DT><B>--rsasig</B><DD>
708Propose and allow RSA signatures for authentication of IKE peers. This authentication
709requires that each side have have a private key of its own and know the
710public key of its peer. May be combined with <B>--psk</B>;
711at least one must be specified.
712<DT><B>--encrypt</B><DD>
713All proposed or accepted IPsec SAs will include non-null ESP.
714The actual choices of transforms are wired into <B>pluto</B>.
715<DT><B>--authenticate</B><DD>
716All proposed IPsec SAs will include AH.
717All accepted IPsec SAs will include AH or ESP with authentication.
718The actual choices of transforms are wired into <B>pluto</B>.
719Note that this has nothing to do with IKE authentication.
720<DT><B>--compress</B><DD>
721All proposed IPsec SAs will include IPCOMP (compression).
722This will be ignored if KLIPS is not configured with IPCOMP support.
723<DT><B>--tunnel</B><DD>
724the IPsec SA should use tunneling. Implicit if the SA is for clients.
725Must only be used with <B>--authenticate</B> or <B>--encrypt</B>.
726<DT><B>--ipv4</B><DD>
727The host addresses will be interpreted as IPv4 addresses. This is the
728default. Note that for a connection, all host addresses must be of
729the same Address Family (IPv4 and IPv6 use different Address Families).
730<DT><B>--ipv6</B><DD>
731The host addresses (including nexthop) will be interpreted as IPv6 addresses.
732Note that for a connection, all host addresses must be of
733the same Address Family (IPv4 and IPv6 use different Address Families).
734<DT><B>--tunnelipv4</B><DD>
735The client addresses will be interpreted as IPv4 addresses. The default is
736to match what the host will be. This does not imply <B>--tunnel</B> so the
737flag can be safely used when no tunnel is actually specified.
738Note that for a connection, all tunnel addresses must be of the same
739Address Family.
740<DT><B>--tunnelipv6</B><DD>
741The client addresses will be interpreted as IPv6 addresses. The default is
742to match what the host will be. This does not imply <B>--tunnel</B> so the
743flag can be safely used when no tunnel is actually specified.
744Note that for a connection, all tunnel addresses must be of the same
745Address Family.
746<DT><B>--pfs</B><DD>
747There should be Perfect Forward Secrecy - new keying material will
748be generated for each IPsec SA rather than being derived from the ISAKMP
749SA keying material.
750Since the group to be used cannot be negotiated (a dubious feature of the
751standard), <B>pluto</B> will propose the same group that was used during Phase 1.
752We don't implement a stronger form of PFS which would require that the
753ISAKMP SA be deleted after the IPSEC SA is negotiated.
754<DT><B>--disablearrivalcheck</B><DD>
755If the connection is a tunnel, allow packets arriving through the tunnel
756to have any source and destination addresses.
757</DL>
758<P>
759
760If none of the <B>--encrypt</B>, <B>--authenticate</B>, <B>--compress</B>,
761or <B>--pfs</B> flags is given, the initiating the connection will
762only build an ISAKMP SA. For such a connection, client subnets have
763no meaning and must not be specified.
764<P>
765
766More work is needed to allow for flexible policies. Currently
767policy is hardwired in the source file spdb.c. The ISAKMP SAs may use
768Oakley groups MODP1024 and MODP1536; 3DES encryption; SHA1-96
769and MD5-96 authentication. The IPsec SAs may use 3DES and
770MD5-96 or SHA1-96 for ESP, or just MD5-96 or SHA1-96 for AH.
771IPCOMP Compression is always Deflate.
772<DL COMPACT>
773<DT><B>--ikelifetime</B>&nbsp;<I>seconds</I><DD>
774how long <B>pluto</B> will propose that an ISAKMP SA be allowed to live.
775The default is 3600 (one hour) and the maximum is 28800 (8 hours).
776This option will not affect what is accepted.
777<B>pluto</B> will reject proposals that exceed the maximum.
778<DT><B>--ipseclifetime</B>&nbsp;<I>seconds</I><DD>
779how long <B>pluto</B> will propose that an IPsec SA be allowed to live.
780The default is 28800 (eight hours) and the maximum is 86400 (one day).
781This option will not affect what is accepted.
782<B>pluto</B> will reject proposals that exceed the maximum.
783<DT><B>--rekeymargin</B>&nbsp;<I>seconds</I><DD>
784how long before an SA's expiration should <B>pluto</B> try to negotiate
785a replacement SA. This will only happen if <B>pluto</B> was the initiator.
786The default is 540 (nine minutes).
787<DT><B>--rekeyfuzz</B>&nbsp;<I>percentage</I><DD>
788maximum size of random component to add to rekeymargin, expressed as
789a percentage of rekeymargin. <B>pluto</B> will select a delay uniformly
790distributed within this range. By default, the percentage will be 100.
791If greater determinism is desired, specify 0. It may be appropriate
792for the percentage to be much larger than 100.
793<DT><B>--keyingtries</B>&nbsp;<I>count</I><DD>
794how many times <B>pluto</B> should try to negotiate an SA,
795either for the first time or for rekeying.
796A value of 0 is interpreted as a very large number: never give up.
797The default is three.
798<DT><B>--dontrekey</B><DD>
799A misnomer.
800Only rekey a connection if we were the Initiator and there was recent
801traffic on the existing connection.
802This applies to Phase 1 and Phase 2.
803This is currently the only automatic way for a connection to terminate.
804It may be useful with Road Warrior or Opportunistic connections.
805<BR>
806
807Since SA lifetime negotiation is take-it-or-leave it, a Responder
808normally uses the shorter of the negotiated or the configured lifetime.
809This only works because if the lifetime is shorter than negotiated,
810the Responder will rekey in time so that everything works.
811This interacts badly with <B>--dontrekey</B>. In this case,
812the Responder will end up rekeying to rectify a shortfall in an IPsec SA
813lifetime; for an ISAKMP SA, the Responder will accept the negotiated
814lifetime.
815<DT><B>--delete</B><DD>
816when used in the connection form, it causes any previous connection
817with this name to be deleted before this one is added. Unlike a
818normal delete, no diagnostic is produced if there was no previous
819connection to delete. Any routing in place for the connection is undone.
820</DL>
821<P>
822
823The delete form deletes a named connection description and any
824SAs established or negotiations initiated using this connection.
825Any routing in place for the connection is undone.
826<DL COMPACT>
827<DT><B>--delete</B><DD>
828<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
829</DL>
830<P>
831
832The deletestate form deletes the state object with the specified serial number.
833This is useful for selectively deleting instances of connections.
834<DL COMPACT>
835<DT><B>--deletestate</B>&nbsp;<I>state-number</I><DD>
836</DL>
837<P>
838
839The route form of the <B>whack</B> command tells <B>pluto</B> to set up
840routing for a connection.
841Although like a traditional route, it uses an ipsec device as a
842virtual interface.
843Once routing is set up, no packets will be
844sent ``in the clear'' to the peer's client specified in the connection.
845A TRAP shunt eroute will be installed; if outbound traffic is caught,
846Pluto will initiate the connection.
847An explicit <B>whack</B> route is not always needed: if it hasn't been
848done when an IPsec SA is being installed, one will be automatically attempted.
849<P>
850
851When a routing is attempted for a connection, there must not already
852be a routing for a different connection with the same subnet but different
853interface or destination, or if
854there is, it must not be being used by an IPsec SA. Otherwise the
855attempt will fail.
856<DL COMPACT>
857<DT><B>--route</B><DD>
858<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
859</DL>
860<P>
861
862The unroute form of the <B>whack</B> command tells <B>pluto</B> to undo
863a routing. <B>pluto</B> will refuse if an IPsec SA is using the connection.
864If another connection is sharing the same routing, it will be left in place.
865Without a routing, packets will be sent without encryption or authentication.
866<DL COMPACT>
867<DT><B>--unroute</B><DD>
868<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
869</DL>
870<P>
871
872The initiate form tells <B>pluto</B> to initiate a negotiation with another
873<B>pluto</B> (or other IKE daemon) according to the named connection.
874Initiation requires a route that <B>--route</B> would provide;
875if none is in place at the time an IPsec SA is being installed,
876<B>pluto</B> attempts to set one up.
877<DL COMPACT>
878<DT><B>--initiate</B><DD>
879<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
880<DT><B>--asynchronous<DD>
881</DL>
882<P>
883
884The initiate form of the whack</B> command will relay back from
885<B>pluto</B> status information via the UNIX domain socket (unless
886--asynchronous is specified). The status information is meant to
887look a bit like that from <B>FTP</B>. Currently <B>whack</B> simply
888copies this to stderr. When the request is finished (eg. the SAs are
889established or <B>pluto</B> gives up), <B>pluto</B> closes the channel,
890causing <B>whack</B> to terminate.
891<P>
892
893The opportunistic initiate form is mainly used for debugging.
894<DL COMPACT>
895<DT><B>--tunnelipv4</B><DD>
896<DT><B>--tunnelipv6</B><DD>
897<DT><B>--oppohere</B>&nbsp;<I>ip-address</I><DD>
898<DT><B>--oppothere</B>&nbsp;<I>ip-address</I><DD>
899</DL>
900<P>
901
902This will cause <B>pluto</B> to attempt to opportunistically initiate a
903connection from here to the there, even if a previous attempt
904had been made.
905The whack log will show the progress of this attempt.
906<P>
907
908The terminate form tells <B>pluto</B> to delete any SAs that use the specified
909connection and to stop any negotiations in process.
910It does not prevent new negotiations from starting (the delete form
911has this effect).
912<DL COMPACT>
913<DT><B>--terminate</B><DD>
914<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
915</DL>
916<P>
917
918The public key for informs <B>pluto</B> of the RSA public key for a potential peer.
919Private keys must be kept secret, so they are kept in
920<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
921
922<DL COMPACT>
923<DT><B>--keyid&nbsp;</B><I>id</I><DD>
924specififies the identity of the peer for which a public key should be used.
925Its form is identical to the identity in the connection.
926If no public key is specified, <B>pluto</B> attempts to find KEY records
927from DNS for the id (if a FQDN) or through reverse lookup (if an IP address).
928Note that there several interesting ways in which this is not secure.
929<DT><B>--addkey</B><DD>
930specifies that the new key is added to the collection; otherwise the
931new key replaces any old ones.
932<DT><B>--pubkeyrsa&nbsp;</B><I>key</I><DD>
933specifies the value of the RSA public key. It is a sequence of bytes
934as described in RFC 2537 ``RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)''.
935It is denoted in a way suitable for <I><A HREF="ipsec_ttodata.3.html">ipsec_ttodata</A></I>(3).
936For example, a base 64 numeral starts with 0s.
937</DL>
938<P>
939
940The listen form tells <B>pluto</B> to start listening for IKE requests
941on its public interfaces. To avoid race conditions, it is normal to
942load the appropriate connections into <B>pluto</B> before allowing it
943to listen. If <B>pluto</B> isn't listening, it is pointless to
944initiate negotiations, so it will refuse requests to do so. Whenever
945the listen form is used, <B>pluto</B> looks for public interfaces and
946will notice when new ones have been added and when old ones have been
947removed. This is also the trigger for <B>pluto</B> to read the
948<I>ipsec.secrets</I> file. So listen may useful more than once.
949<DL COMPACT>
950<DT><B>--listen</B><DD>
951start listening for IKE traffic on public interfaces.
952<DT><B>--unlisten</B><DD>
953stop listening for IKE traffic on public interfaces.
954</DL>
955<P>
956
957The status form will display information about the internal state of
958<B>pluto</B>: information about each potential connection, about
959each state object, and about each shunt that <B>pluto</B> is managing
960without an associated connection.
961<DL COMPACT>
962<DT><B>--status</B><DD>
963</DL>
964<P>
965
966The shutdown form is the proper way to shut down <B>pluto</B>.
967It will tear down the SAs on this machine that <B>pluto</B> has negotiated.
968It does not inform its peers, so the SAs on their machines remain.
969<DL COMPACT>
970<DT><B>--shutdown</B><DD>
971</DL>
972<A NAME="lbAM">&nbsp;</A>
973<H3>Examples</H3>
974
975<P>
976
977It would be normal to start <B>pluto</B> in one of the system initialization
978scripts. It needs to be run by the superuser. Generally, no arguments are needed.
979To run in manually, the superuser can simply type
980<P>
981&nbsp;&nbsp;&nbsp;ipsec pluto
982<P>
983The command will immediately return, but a <B>pluto</B> process will be left
984running, waiting for requests from <B>whack</B> or a peer.
985<P>
986
987Using <B>whack</B>, several potential connections would be described:
988<DL COMPACT>
989<DT>
990
991&nbsp;&nbsp;&nbsp;ipsec whack --name&nbsp;silly
992--host&nbsp;127.0.0.1 --to --host&nbsp;127.0.0.2
993--ikelifetime&nbsp;900 --ipseclifetime&nbsp;800 --keyingtries&nbsp;3
994
995</DL>
996<P>
997
998<DD>Since this silly connection description specifies neither encryption,
999authentication, nor tunneling, it could only be used to establish
1000an ISAKMP SA.
1001<DL COMPACT>
1002<DT>
1003
1004&nbsp;&nbsp;&nbsp;ipsec whack --name&nbsp;secret --host&nbsp;10.0.0.1 --client&nbsp;10.0.1.0/24
1005--to --host&nbsp;10.0.0.2 --client&nbsp;10.0.2.0/24
1006--encrypt
1007
1008</DL>
1009<P>
1010
1011<DD>This is something that must be done on both sides. If the other
1012side is <B>pluto</B>, the same <B>whack</B> command could be used on it
1013(the command syntax is designed to not distinguish which end is ours).
1014<P>
1015
1016Now that the connections are specified, <B>pluto</B> is ready to handle
1017requests and replies via the public interfaces. We must tell it to discover
1018those interfaces and start accepting messages from peers:
1019<P>
1020&nbsp;&nbsp;&nbsp;ipsec whack --listen
1021<P>
1022
1023If we don't immediately wish to bring up a secure connection between
1024the two clients, we might wish to prevent insecure traffic.
1025The routing form asks <B>pluto</B> to cause the packets sent from
1026our client to the peer's client to be routed through the ipsec0
1027device; if there is no SA, they will be discarded:
1028<P>
1029&nbsp;&nbsp;&nbsp;ipsec whack --route secret
1030<P>
1031
1032Finally, we are ready to get <B>pluto</B> to initiate negotiation
1033for an IPsec SA (and implicitly, an ISAKMP SA):
1034<P>
1035&nbsp;&nbsp;&nbsp;ipsec whack --initiate&nbsp;--name&nbsp;secret
1036<P>
1037A small log of interesting events will appear on standard output
1038(other logging is sent to syslog).
1039<P>
1040
1041<B>whack</B> can also be used to terminate <B>pluto</B> cleanly, tearing down
1042all SAs that it has negotiated.
1043<P>
1044&nbsp;&nbsp;&nbsp;ipsec whack --shutdown
1045<P>
1046Notification of any IPSEC SA deletion, but not ISAKMP SA deletion
1047is sent to the peer. Unfortunately, such Notification is not reliable.
1048Furthermore, <B>pluto</B> itself ignores Notifications.
1049<A NAME="lbAN">&nbsp;</A>
1050<H3>The updown command</H3>
1051
1052<P>
1053
1054Whenever <B>pluto</B> brings a connection up or down, it invokes
1055the updown command. This command is specified using the <B>--updown</B>
1056option. This allows for customized control over routing and firewall manipulation.
1057<P>
1058
1059The updown is invoked for five different operations. Each of
1060these operations can be for our client subnet or for our host itself.
1061<DL COMPACT>
1062<DT><B>prepare-host</B> or <B>prepare-client</B><DD>
1063is run before bringing up a new connection if no other connection
1064with the same clients is up. Generally, this is useful for deleting a
1065route that might have been set up before <B>pluto</B> was run or
1066perhaps by some agent not known to <B>pluto</B>.
1067<DT><B>route-host</B> or <B>route-client</B><DD>
1068is run when bringing up a connection for a new peer client subnet
1069(even if <B>prepare-host</B> or <B>prepare-client</B> was run). The
1070command should install a suitable route. Routing decisions are based
1071only on the destination (peer's client) subnet address, unlike eroutes
1072which discriminate based on source too.
1073<DT><B>unroute-host</B> or <B>unroute-client</B><DD>
1074is run when bringing down the last connection for a particular peer
1075client subnet. It should undo what the <B>route-host</B> or <B>route-client</B>
1076did.
1077<DT><B>up-host</B> or <B>up-client</B><DD>
1078is run when bringing up a tunnel eroute with a pair of client subnets
1079that does not already have a tunnel eroute.
1080This command should install firewall rules as appropriate.
1081It is generally a good idea to allow IKE messages (UDP port 500)
1082travel between the hosts.
1083<DT><B>down-host</B> or <B>down-client</B><DD>
1084is run when bringing down the eroute for a pair of client subnets.
1085This command should delete firewall rules as appropriate. Note that
1086there may remain some inbound IPsec SAs with these client subnets.
1087</DL>
1088<P>
1089
1090The script is passed a large number of environment variables to specify
1091what needs to be done.
1092<DL COMPACT>
1093<DT><B>PLUTO_VERSION</B><DD>
1094indicates what version of this interface is being used. This document
1095describes version 1.1. This is upwardly compatible with version 1.0.
1096<DT><B>PLUTO_VERB</B><DD>
1097specifies the name of the operation to be performed
1098(<B>prepare-host</B>,r <B>prepare-client</B>,
1099<B>up-host</B>, <B>up-client</B>,
1100<B>down-host</B>, or <B>down-client</B>). If the address family for
1101security gateway to security gateway communications is IPv6, then
1102a suffix of -v6 is added to the verb.
1103<DT><B>PLUTO_CONNECTION</B><DD>
1104is the name of the connection for which we are routing.
1105<DT><B>PLUTO_NEXT_HOP</B><DD>
1106is the next hop to which packets bound for the peer must be sent.
1107<DT><B>PLUTO_INTERFACE</B><DD>
1108is the name of the ipsec interface to be used.
1109<DT><B>PLUTO_ME</B><DD>
1110is the IP address of our host.
1111<DT><B>PLUTO_MY_CLIENT</B><DD>
1112is the IP address / count of our client subnet.
1113If the client is just the host, this will be the host's own IP address / max
1114(where max is 32 for IPv4 and 128 for IPv6).
1115<DT><B>PLUTO_MY_CLIENT_NET</B><DD>
1116is the IP address of our client net.
1117If the client is just the host, this will be the host's own IP address.
1118<DT><B>PLUTO_MY_CLIENT_MASK</B><DD>
1119is the mask for our client net.
1120If the client is just the host, this will be 255.255.255.255.
1121<DT><B>PLUTO_PEER</B><DD>
1122is the IP address of our peer.
1123<DT><B>PLUTO_PEER_CLIENT</B><DD>
1124is the IP address / count of the peer's client subnet.
1125If the client is just the peer, this will be the peer's own IP address / max
1126(where max is 32 for IPv4 and 128 for IPv6).
1127<DT><B>PLUTO_PEER_CLIENT_NET</B><DD>
1128is the IP address of the peer's client net.
1129If the client is just the peer, this will be the peer's own IP address.
1130<DT><B>PLUTO_PEER_CLIENT_MASK</B><DD>
1131is the mask for the peer's client net.
1132If the client is just the peer, this will be 255.255.255.255.
1133</DL>
1134<P>
1135
1136All output sent by the script to stderr or stdout is logged. The
1137script should return an exit status of 0 if and only if it succeeds.
1138<P>
1139
1140<B>Pluto</B> waits for the script to finish and will not do any other
1141processing while it is waiting.
1142The script may assume that <B>pluto</B> will not change anything
1143while the script runs.
1144The script should avoid doing anything that takes much time and it
1145should not issue any command that requires processing by <B>pluto</B>.
1146Either of these activities could be performed by a background
1147subprocess of the script.
1148<A NAME="lbAO">&nbsp;</A>
1149<H3>Rekeying</H3>
1150
1151<P>
1152
1153When an SA that was initiated by <B>pluto</B> has only a bit of
1154lifetime left,
1155<B>pluto</B> will initiate the creation of a new SA. This applies to
1156ISAKMP and IPsec SAs.
1157The rekeying will be initiated when the SA's remaining lifetime is
1158less than the rekeymargin plus a random percentage, between 0 and
1159rekeyfuzz, of the rekeymargin.
1160<P>
1161
1162Similarly, when an SA that was initiated by the peer has only a bit of
1163lifetime left, <B>pluto</B> will try to initiate the creation of a
1164replacement.
1165To give preference to the initiator, this rekeying will only be initiated
1166when the SA's remaining lifetime is half of rekeymargin.
1167If rekeying is done by the responder, the roles will be reversed: the
1168responder for the old SA will be the initiator for the replacement.
1169The former initiator might also initiate rekeying, so there may
1170be redundant SAs created.
1171To avoid these complications, make sure that rekeymargin is generous.
1172<P>
1173
1174One risk of having the former responder initiate is that perhaps
1175none of its proposals is acceptable to the former initiator
1176(they have not been used in a successful negotiation).
1177To reduce the chances of this happening, and to prevent loss of security,
1178the policy settings are taken from the old SA (this is the case even if
1179the former initiator is initiating).
1180These may be stricter than those of the connection.
1181<P>
1182
1183<B>pluto</B> will not rekey an SA if that SA is not the most recent of its
1184type (IPsec or ISAKMP) for its potential connection.
1185This avoids creating redundant SAs.
1186<P>
1187
1188The random component in the rekeying time (rekeyfuzz) is intended to
1189make certain pathological patterns of rekeying unstable. If both
1190sides decide to rekey at the same time, twice as many SAs as necessary
1191are created. This could become a stable pattern without the
1192randomness.
1193<P>
1194
1195Another more important case occurs when a security gateway has SAs
1196with many other security gateways. Each of these connections might
1197need to be rekeyed at the same time. This would cause a high peek
1198requirement for resources (network bandwidth, CPU time, entropy for
1199random numbers). The rekeyfuzz can be used to stagger the rekeying
1200times.
1201<P>
1202
1203Once a new set of SAs has been negotiated, <B>pluto</B> will never send
1204traffic on a superseded one. Traffic will be accepted on an old SA
1205until it expires.
1206<A NAME="lbAP">&nbsp;</A>
1207<H3>Selecting a Connection When Responding: Road Warrior Support</H3>
1208
1209<P>
1210
1211When <B>pluto</B> receives an initial Main Mode message, it needs to
1212decide which connection this message is for. It picks based solely on
1213the source and destination IP addresses of the message. There might
1214be several connections with suitable IP addresses, in which case one
1215of them is arbitrarily chosen. (The ISAKMP SA proposal contained in
1216the message could be taken into account, but it is not.)
1217<P>
1218
1219The ISAKMP SA is negotiated before the parties pass further
1220identifying information, so all ISAKMP SA characteristics specified in
1221the connection description should be the same for every connection
1222with the same two host IP addresses. At the moment, the only
1223characteristic that might differ is authentication method.
1224<P>
1225
1226Up to this point,
1227all configuring has presumed that the IP addresses
1228are known to all parties ahead of time. This will not work
1229when either end is mobile (or assigned a dynamic IP address for other
1230reasons). We call this situation ``Road Warrior''. It is fairly tricky
1231and has some important limitations, most of which are features of
1232the IKE protocol.
1233<P>
1234
1235Only the initiator may be mobile:
1236the initiator may have an IP number unknown to the responder. When
1237the responder doesn't recognize the IP address on the first Main Mode
1238packet, it looks for a connection with itself as one end and <B>%any</B>
1239as the other.
1240If it cannot find one, it refuses to negotiate. If it
1241does find one, it creates a temporary connection that is a duplicate
1242except with the <B>%any</B> replaced by the source IP address from the
1243packet; if there was no identity specified for the peer, the new IP
1244address will be used.
1245<P>
1246
1247When <B>pluto</B> is using one of these temporary connections and
1248needs to find the preshared secret or RSA private key in <I>ipsec.secrets</I>,
1249and and the connection specified no identity for the peer, <B>%any</B>
1250is used as its identity. After all, the real IP address was apparently
1251unknown to the configuration, so it is unreasonable to require that
1252it be used in this table.
1253<P>
1254
1255Part way into the Phase 1 (Main Mode) negotiation using one of these
1256temporary connection descriptions, <B>pluto</B> will be receive an
1257Identity Payload. At this point, <B>pluto</B> checks for a more
1258appropriate connection, one with an identity for the peer that matches
1259the payload but which would use the same keys so-far used for
1260authentication. If it finds one, it will switch to using this better
1261connection (or a temporary derived from this, if it has <B>%any</B>
1262for the peer's IP address). It may even turn out that no connection
1263matches the newly discovered identity, including the current connection;
1264if so, <B>pluto</B> terminates negotiation.
1265<P>
1266
1267Unfortunately, if preshared secret authentication is being used, the
1268Identity Payload is encrypted using this secret, so the secret must be
1269selected by the responder without knowing this payload. This
1270limits there to being at most one preshared secret for all Road Warrior
1271systems connecting to a host. RSA Signature authentications does not
1272require that the responder know how to select the initiator's public key
1273until after the initiator's Identity Payload is decoded (using the
1274responder's private key, so that must be preselected).
1275<P>
1276
1277When <B>pluto</B> is responding to a Quick Mode negotiation via one of these
1278temporary connection descriptions, it may well find that the subnets
1279specified by the initiator don't match those in the temporary
1280connection description. If so, it will look for a connection with
1281matching subnets, its own host address, a peer address of <B>%any</B>
1282and matching identities.
1283If it finds one, a new temporary connection is derived from this one
1284and used for the Quick Mode negotiation of IPsec SAs. If it does not
1285find one, <B>pluto</B> terminates negotiation.
1286<P>
1287
1288Be sure to specify an appropriate nexthop for the responder
1289to send a message to the initiator: <B>pluto</B> has no way of guessing
1290it (if forwarding isn't required, use an explicit <B>%direct</B> as the nexthop
1291and the IP address of the initiator will be filled in; the obsolete
1292notation <B>0.0.0.0</B> is still accepted).
1293<P>
1294
1295<B>pluto</B> has no special provision for the initiator side. The current
1296(possibly dynamic) IP address and nexthop must be used in defining
1297connections. These must be
1298properly configured each time the initiator's IP address changes.
1299<B>pluto</B> has no mechanism to do this automatically.
1300<P>
1301
1302Although we call this Road Warrior Support, it could also be used to
1303support encrypted connections with anonymous initiators. The
1304responder's organization could announce the preshared secret that would be used
1305with unrecognized initiators and let anyone connect. Of course the initiator's
1306identity would not be authenticated.
1307<P>
1308
1309If any Road Warrior connections are supported, <B>pluto</B> cannot
1310reject an exchange initiated by an unknown host until it has
1311determined that the secret is not shared or the signature is invalid.
1312This must await the
1313third Main Mode message from the initiator. If no Road Warrior
1314connection is supported, the first message from an unknown source
1315would be rejected. This has implications for ease of debugging
1316configurations and for denial of service attacks.
1317<P>
1318
1319Although a Road Warrior connection must be initiated by the mobile
1320side, the other side can and will rekey using the temporary connection
1321it has created. If the Road Warrior wishes to be able to disconnect,
1322it is probably wise to set <B>--keyingtries</B> to 1 in the
1323connection on the non-mobile side to prevent it trying to rekey the
1324connection. Unfortunately, there is no mechanism to unroute the
1325connection automatically.
1326<A NAME="lbAQ">&nbsp;</A>
1327<H3>Debugging</H3>
1328
1329<P>
1330
1331<B>pluto</B> accepts several optional arguments, useful mostly for debugging.
1332Except for <B>--interface</B>, each should appear at most once.
1333<DL COMPACT>
1334<DT><B>--interface</B> <I>interfacename</I><DD>
1335specifies that the named real public network interface should be considered.
1336The interface name specified should not be <B>ipsec</B><I>N</I>.
1337If the option doesn't appear, all interfaces are considered.
1338To specify several interfaces, use the option once for each.
1339One use of this option is to specify which interface should be used
1340when two or more share the same IP address.
1341<DT><B>--ikeport</B> <I>port-number</I><DD>
1342changes the UDP port that <B>pluto</B> will use
1343(default, specified by IANA: 500)
1344<DT><B>--ctlbase</B> <I>path</I><DD>
1345basename for control files.
1346<I>path</I>.ctl is the socket through which <B>whack</B> communicates with
1347<B>pluto</B>.
1348<I>path</I>.pid is the lockfile to prevent multiple <B>pluto</B> instances.
1349The default is <I>/var/run/pluto</I>).
1350<DT><B>--secretsfile</B> <I>file</I><DD>
1351specifies the file for authentication secrets
1352(default: <I>/etc/ipsec.secrets</I>).
1353This name is subject to ``globbing'' as in <I><A HREF="sh.1.html">sh</A></I>(1),
1354so every file with a matching name is processed.
1355Quoting is generally needed to prevent the shell from doing the globbing.
1356<DT><B>--adns</B> <I>pathname</I><DD>
1357<DT><B>--lwdnsq</B> <I>pathname</I><DD>
1358specifies where to find <B>pluto</B>'s helper program for asynchronous DNS lookup.
1359<B>pluto</B> can be built to use one of two helper programs: <B>_pluto_adns</B>
1360or <B>lwdnsq</B>. You must use the program for which it was built.
1361By default, <B>pluto</B> will look for the program in
1362<B>$IPSEC_DIR</B> (if that environment variable is defined) or, failing that,
1363in the same directory as <B>pluto</B>.
1364<DT><B>--nofork</B><DD>
1365disable ``daemon fork'' (default is to fork). In addition, after the
1366lock file and control socket are created, print the line ``Pluto
1367initialized'' to standard out.
1368<DT><B>--noklips</B><DD>
1369don't actually implement negotiated IPsec SAs
1370<DT><B>--uniqueids</B><DD>
1371if this option has been selected, whenever a new ISAKMP SA is
1372established, any connection with the same Peer ID but a different
1373Peer IP address is unoriented (causing all its SAs to be deleted).
1374This helps clean up dangling SAs when a connection is lost and
1375then regained at another IP address.
1376<DT><B>--stderrlog</B><DD>
1377log goes to standard out {default is to use <I><A HREF="syslogd.8.html">syslogd</A></I>(8))
1378</DL>
1379<P>
1380
1381For example
1382<DL COMPACT>
1383<DT>pluto --secretsfile&nbsp;ipsec.secrets --ctlbase&nbsp;pluto.base --ikeport&nbsp;8500 --nofork --noklips --stderrlog<DD>
1384</DL>
1385<P>
1386
1387lets one test <B>pluto</B> without using the superuser account.
1388<P>
1389
1390<B>pluto</B> is willing to produce a prodigious amount of debugging
1391information. To do so, it must be compiled with -DDEBUG. There are
1392several classes of debugging output, and <B>pluto</B> may be directed to
1393produce a selection of them. All lines of
1394debugging output are prefixed with ``|&nbsp;'' to distinguish them from error
1395messages.
1396<P>
1397
1398When <B>pluto</B> is invoked, it may be given arguments to specify
1399which classes to output. The current options are:
1400<DL COMPACT>
1401<DT><B>--debug-raw</B><DD>
1402show the raw bytes of messages
1403<DT><B>--debug-crypt</B><DD>
1404show the encryption and decryption of messages
1405<DT><B>--debug-parsing</B><DD>
1406show the structure of input messages
1407<DT><B>--debug-emitting</B><DD>
1408show the structure of output messages
1409<DT><B>--debug-control</B><DD>
1410show <B>pluto</B>'s decision making
1411<DT><B>--debug-lifecycle</B><DD>
1412[this option is temporary] log more detail of lifecycle of SAs
1413<DT><B>--debug-klips</B><DD>
1414show <B>pluto</B>'s interaction with <B>KLIPS</B>
1415<DT><B>--debug-dns</B><DD>
1416show <B>pluto</B>'s interaction with <B>DNS</B> for KEY and TXT records
1417<DT><B>--debug-oppo</B><DD>
1418show why <B>pluto</B> didn't find a suitable DNS TXT record to authorize opportunistic initiation
1419<DT><B>--debug-all</B><DD>
1420all of the above
1421<DT><B>--debug-private</B><DD>
1422allow debugging output with private keys.
1423<DT><B>--debug-none</B><DD>
1424none of the above
1425</DL>
1426<P>
1427
1428The debug form of the
1429<B>whack</B> command will change the selection in a running
1430<B>pluto</B>.
1431If a connection name is specified, the flags are added whenever
1432<B>pluto</B> has identified that it is dealing with that connection.
1433Unfortunately, this is often part way into the operation being observed.
1434<P>
1435
1436For example, to start a <B>pluto</B> with a display of the structure of input
1437and output:
1438<DL COMPACT>
1439<DT><DD>
1440pluto --debug-emitting --debug-parsing
1441</DL>
1442<P>
1443
1444To later change this <B>pluto</B> to only display raw bytes:
1445<DL COMPACT>
1446<DT><DD>
1447whack --debug-raw
1448</DL>
1449<P>
1450
1451For testing, SSH's IKE test page is quite useful:
1452<DL COMPACT>
1453<DT><DD>
1454<I><A HREF="http://isakmp-test.ssh.fi/">http://isakmp-test.ssh.fi/</A></I>
1455</DL>
1456<P>
1457
1458Hint: ISAKMP SAs are often kept alive by IKEs even after the IPsec SA
1459is established. This allows future IPsec SA's to be negotiated
1460directly. If one of the IKEs is restarted, the other may try to use
1461the ISAKMP SA but the new IKE won't know about it. This can lead to
1462much confusion. <B>pluto</B> is not yet smart enough to get out of such a
1463mess.
1464<A NAME="lbAR">&nbsp;</A>
1465<H3>Pluto's Behaviour When Things Go Wrong</H3>
1466
1467<P>
1468
1469When <B>pluto</B> doesn't understand or accept a message, it just
1470ignores the message. It is not yet capable of communicating the
1471problem to the other IKE daemon (in the future it might use
1472Notifications to accomplish this in many cases). It does log a diagnostic.
1473<P>
1474
1475When <B>pluto</B> gets no response from a message, it resends the same
1476message (a message will be sent at most three times). This is
1477appropriate: UDP is unreliable.
1478<P>
1479
1480When pluto gets a message that it has already seen, there are many
1481cases when it notices and discards it. This too is appropriate for UDP.
1482<P>
1483
1484Combine these three rules, and you can explain many apparently
1485mysterious behaviours. In a <B>pluto</B> log, retrying isn't usually the
1486interesting event. The critical thing is either earlier (<B>pluto</B>
1487got a message which it didn't like and so ignored, so it was still
1488awaiting an acceptable message and got impatient) or on the other
1489system (<B>pluto</B> didn't send a reply because it wasn't happy with
1490the previous message).
1491<A NAME="lbAS">&nbsp;</A>
1492<H3>Notes</H3>
1493
1494<P>
1495
1496If <B>pluto</B> is compiled without -DKLIPS, it negotiates Security
1497Associations but never ask the kernel to put them in place and never
1498makes routing changes. This allows <B>pluto</B> to be tested on systems
1499without <B>KLIPS</B>, but makes it rather useless.
1500<P>
1501
1502Each IPsec SA is assigned an SPI, a 32-bit number used to refer to the SA.
1503The IKE protocol lets the destination of the SA choose the SPI.
1504The range 0 to 0xFF is reserved for IANA.
1505<B>Pluto</B> also avoids choosing an SPI in the range 0x100 to 0xFFF,
1506leaving these SPIs free for manual keying.
1507Remember that the peer, if not <B>pluto</B>, may well chose
1508SPIs in this range.
1509<A NAME="lbAT">&nbsp;</A>
1510<H3>Policies</H3>
1511
1512<P>
1513
1514This catalogue of policies may be of use when trying to configure
1515<B>Pluto</B> and another IKE implementation to interoperate.
1516<P>
1517
1518In Phase 1, only Main Mode is supported. We are not sure that
1519Aggressive Mode is secure. For one thing, it does not support
1520identity protection. It may allow more severe Denial Of Service
1521attacks.
1522<P>
1523
1524No Informational Exchanges are supported. These are optional and
1525since their delivery is not assured, they must not matter.
1526It is the case that some IKE implementations won't interoperate
1527without Informational Exchanges, but we feel they are broken.
1528<P>
1529
1530No Informational Payloads are supported. These are optional, but
1531useful. It is of concern that these payloads are not authenticated in
1532Phase 1, nor in those Phase 2 messages authenticated with <A HREF="HASH.3.html">HASH</A>(3).
1533<DL COMPACT>
1534<DT>*<DD>
1535Diffie Hellman Groups MODP 1024 and MODP 1536 (2 and 5)
1536are supported.
1537Group MODP768 (1) is not supported because it is too weak.
1538<DT>*<DD>
1539Host authetication can be done by RSA Signatures or Pre-Shared
1540Secrets.
1541<DT>*<DD>
15423DES CBC (Cypher Block Chaining mode) is the only encryption
1543supported, both for ISAKMP SAs and IPSEC SAs.
1544<DT>*<DD>
1545MD5 and SHA1 hashing are supported for packet authentication in both
1546kinds of SAs.
1547<DT>*<DD>
1548The ESP, AH, or AH plus ESP are supported. If, and only if, AH and
1549ESP are combined, the ESP need not have its own authentication
1550component. The selection is controlled by the --encrypt and
1551--authenticate flags.
1552<DT>*<DD>
1553Each of these may be combined with IPCOMP Deflate compression,
1554but only if the potential connection specifies compression and only
1555if KLIPS is configured with IPCOMP support.
1556<DT>*<DD>
1557The IPSEC SAs may be tunnel or transport mode, where appropriate.
1558The --tunnel flag controls this when <B>pluto</B> is initiating.
1559<DT>*<DD>
1560When responding to an ISAKMP SA proposal, the maximum acceptable
1561lifetime is eight hours. The default is one hour. There is no
1562minimum. The --ikelifetime flag controls this when <B>pluto</B>
1563is initiating.
1564<DT>*<DD>
1565When responding to an IPSEC SA proposal, the maximum acceptable
1566lifetime is one day. The default is eight hours. There is no
1567minimum. The --ipseclifetime flag controls this when <B>pluto</B>
1568is initiating.
1569<DT>*<DD>
1570PFS is acceptable, and will be proposed if the --pfs flag was
1571specified. The DH group proposed will be the same as negotiated for
1572Phase 1.
1573</DL>
1574<A NAME="lbAU">&nbsp;</A>
1575<H2>SIGNALS</H2>
1576
1577<P>
1578
1579<B>Pluto</B> responds to <B>SIGHUP</B> by issuing a suggestion that ``<B>whack</B>
1580--listen'' might have been intended.
1581<P>
1582
1583<B>Pluto</B> exits when it recieves <B>SIGTERM</B>.
1584<A NAME="lbAV">&nbsp;</A>
1585<H2>EXIT STATUS</H2>
1586
1587<P>
1588
1589<B>pluto</B> normally forks a daemon process, so the exit status is
1590normally a very preliminary result.
1591<DL COMPACT>
1592<DT>0<DD>
1593means that all is OK so far.
1594<DT>1<DD>
1595means that something was wrong.
1596<DT>10<DD>
1597means that the lock file already exists.
1598</DL>
1599<P>
1600
1601If <B>whack</B> detects a problem, it will return an exit status of 1.
1602If it received progress messages from <B>pluto</B>, it returns as status
1603the value of the numeric prefix from the last such message
1604that was not a message sent to syslog or a comment
1605(but the prefix for success is treated as 0).
1606Otherwise, the exit status is 0.
1607<A NAME="lbAW">&nbsp;</A>
1608<H2>FILES</H2>
1609
1610<I>/var/run/pluto.pid</I>
1611<BR>
1612
1613<I>/var/run/pluto.ctl</I>
1614<BR>
1615
1616<I>/etc/ipsec.secrets</I>
1617<BR>
1618
1619<I>$IPSEC_LIBDIR/_pluto_adns</I>
1620<BR>
1621
1622<I>$IPSEC_EXECDIR/lwdnsq</I>
1623<BR>
1624
1625<I>/dev/urandom</I>
1626<A NAME="lbAX">&nbsp;</A>
1627<H2>ENVIRONMENT</H2>
1628
1629<I>IPSEC_LIBDIR</I>
1630<BR>
1631
1632<I>IPSEC_EXECDIR</I>
1633<BR>
1634
1635<I>IPSECmyid</I>
1636<A NAME="lbAY">&nbsp;</A>
1637<H2>SEE ALSO</H2>
1638
1639<P>
1640
1641The rest of the FreeS/WAN distribution, in particular <I><A HREF="ipsec.8.html">ipsec</A></I>(8).
1642<P>
1643
1644<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) is designed to make using <B>pluto</B> more pleasant.
1645Use it!
1646<P>
1647
1648<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5)
1649
1650describes the format of the secrets file.
1651<P>
1652
1653<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3), part of the FreeS/WAN distribution, describes the
1654forms that IP addresses may take.
1655<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3), part of the FreeS/WAN distribution, describes the
1656forms that subnet specifications.
1657<P>
1658
1659For more information on IPsec, the mailing list, and the relevant
1660documents, see:
1661<DL COMPACT>
1662<DT><DD>
1663
1664<I><A HREF="http://www.ietf.cnri.reston.va.us/html.charters/ipsec-charter.html">http://www.ietf.cnri.reston.va.us/html.charters/ipsec-charter.html</A></I>
1665
1666</DL>
1667<P>
1668
1669At the time of writing, the most relevant IETF RFCs are:
1670<DL COMPACT>
1671<DT><DD>
1672RFC2409 The Internet Key Exchange (IKE)
1673<DT><DD>
1674RFC2408 Internet Security Association and Key Management Protocol (ISAKMP)
1675<DT><DD>
1676RFC2407 The Internet IP Security Domain of Interpretation for ISAKMP
1677</DL>
1678<P>
1679
1680The FreeS/WAN web site &lt;<A HREF="htp://www.freeswan.org">htp://www.freeswan.org</A>&gt;
1681and the mailing lists described there.
1682<A NAME="lbAZ">&nbsp;</A>
1683<H2>HISTORY</H2>
1684
1685This code is released under the GPL terms.
1686See the accompanying file COPYING-2.0 for more details.
1687The GPL does NOT apply to those pieces of code written by others
1688which are included in this distribution, except as noted by the
1689individual authors.
1690<P>
1691
1692This software was originally written
1693for the FreeS/WAN project
1694&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
1695by Angelos D. Keromytis
1696(<A HREF="mailto:angelos@dsl.cis.upenn.edu">angelos@dsl.cis.upenn.edu</A>), in May/June 1997, in Athens, Greece.
1697Thanks go to John Ioannidis for his help.
1698<P>
1699
1700It is currently (2000)
1701being developed and maintained by D. Hugh Redelmeier
1702(<A HREF="mailto:hugh@mimosa.com">hugh@mimosa.com</A>), in Canada. The regulations of Greece and Canada
1703allow us to make the code freely redistributable.
1704<P>
1705
1706Kai Martius (<A HREF="mailto:admin@imib.med.tu-dresden.de">admin@imib.med.tu-dresden.de</A>) contributed the initial
1707version of the code supporting PFS.
1708<P>
1709
1710Richard Guy Briggs &lt;<A HREF="mailto:rgb@conscoop.ottawa.on.ca">rgb@conscoop.ottawa.on.ca</A>&gt; and Peter Onion
1711&lt;<A HREF="mailto:ponion@srd.bt.co.uk">ponion@srd.bt.co.uk</A>&gt; added the PFKEY2 support.
1712<P>
1713
1714We gratefully acknowledge that we use parts of Eric Young's <I>libdes</I>
1715package; see <I>../libdes/COPYRIGHT</I>.
1716<A NAME="lbBA">&nbsp;</A>
1717<H2>BUGS</H2>
1718
1719<B>pluto</B>
1720
1721is a work-in-progress. It currently has many limitations.
1722For example, it ignores notification messages that it receives, and
1723it generates only Delete Notifications and those only for IPSEC SAs.
1724<P>
1725
1726<B>pluto</B> does not support the Commit Flag.
1727The Commit Flag is a bad feature of the IKE protocol.
1728It isn't protected -- neither encrypted nor authenticated.
1729A man in the middle could turn it on, leading to DoS.
1730We just ignore it, with a warning.
1731This should let us interoperate with
1732implementations that insist on it, with minor damage.
1733<P>
1734
1735<B>pluto</B> does not check that the SA returned by the Responder
1736is actually one that was proposed. It only checks that the SA is
1737acceptable. The difference is not large, but can show up in attributes
1738such as SA lifetime.
1739<P>
1740
1741There is no good way for a connection to be automatically terminated.
1742This is a problem for Road Warrior and Opportunistic connections.
1743The <B>--dontrekey</B> option does prevent the SAs from
1744being rekeyed on expiry.
1745Additonally, if a Road Warrior connection has a client subnet with a fixed IP
1746address, a negotiation with that subnet will cause any other
1747connection instantiations with that same subnet to be unoriented
1748(deleted, in effect).
1749See also the --uniqueids option for an extension of this.
1750<P>
1751
1752When <B>pluto</B> sends a message to a peer that has disappeared,
1753<B>pluto</B> receives incomplete information from the kernel, so it
1754logs the unsatisfactory message ``some IKE message we sent has been
1755rejected with ECONNREFUSED (kernel supplied no details)''. John
1756Denker suggests that this command is useful for tracking down the
1757source of these problems:
1758<BR>
1759
1760<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>tcpdump -i eth0 icmp[0] != 8 and icmp[0] != 0<BR>
1761<BR>
1762
1763Substitute your public interface for eth0 if it is different.
1764<P>
1765
1766The word ``authenticate'' is used for two different features. We must
1767authenticate each IKE peer to the other. This is an important task of
1768Phase 1. Each packet must be authenticated, both in IKE and in IPsec,
1769and the method for IPsec is negotiated as an AH SA or part of an ESP SA.
1770Unfortunately, the protocol has no mechanism for authenticating the Phase 2
1771identities.
1772<P>
1773
1774Bugs should be reported to the &lt;<A HREF="mailto:users@lists.freeswan.org">users@lists.freeswan.org</A>&gt; mailing list.
1775Caution: we cannot accept
1776actual code from US residents, or even US citizens living outside the
1777US, because that would bring FreeS/WAN under US export law. Some
1778other countries cause similar problems. In general, we would prefer
1779that you send detailed problem reports rather than code: we want
1780FreeS/WAN to be unquestionably freely exportable, which means being
1781very careful about where the code comes from, and for a small bug fix,
1782that is often more time-consuming than just reinventing the fix
1783ourselves.
1784<P>
1785
1786<HR>
1787<A NAME="index">&nbsp;</A><H2>Index</H2>
1788<DL>
1789<DT><A HREF="#lbAB">NAME</A><DD>
1790<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
1791<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
1792<DL>
1793<DT><A HREF="#lbAE">IKE's Job</A><DD>
1794<DT><A HREF="#lbAF">Pluto</A><DD>
1795<DT><A HREF="#lbAG">Before Running Pluto</A><DD>
1796<DT><A HREF="#lbAH">Setting up <B>KLIPS</B> for <B>pluto</B></A><DD>
1797<DT><A HREF="#lbAI">ipsec.secrets file</A><DD>
1798<DT><A HREF="#lbAJ">Running Pluto</A><DD>
1799<DT><A HREF="#lbAK">Pluto's Internal State</A><DD>
1800<DT><A HREF="#lbAL">Using Whack</A><DD>
1801<DT><A HREF="#lbAM">Examples</A><DD>
1802<DT><A HREF="#lbAN">The updown command</A><DD>
1803<DT><A HREF="#lbAO">Rekeying</A><DD>
1804<DT><A HREF="#lbAP">Selecting a Connection When Responding: Road Warrior Support</A><DD>
1805<DT><A HREF="#lbAQ">Debugging</A><DD>
1806<DT><A HREF="#lbAR">Pluto's Behaviour When Things Go Wrong</A><DD>
1807<DT><A HREF="#lbAS">Notes</A><DD>
1808<DT><A HREF="#lbAT">Policies</A><DD>
1809</DL>
1810<DT><A HREF="#lbAU">SIGNALS</A><DD>
1811<DT><A HREF="#lbAV">EXIT STATUS</A><DD>
1812<DT><A HREF="#lbAW">FILES</A><DD>
1813<DT><A HREF="#lbAX">ENVIRONMENT</A><DD>
1814<DT><A HREF="#lbAY">SEE ALSO</A><DD>
1815<DT><A HREF="#lbAZ">HISTORY</A><DD>
1816<DT><A HREF="#lbBA">BUGS</A><DD>
1817</DL>
1818<HR>
1819This document was created by
1820<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
1821using the manual pages.<BR>
1822Time: 21:40:18 GMT, November 11, 2003
1823</BODY>
1824</HTML>