1.\" $NetBSD: racoonctl.8,v 1.24 2014/03/18 18:20:35 riastradh Exp $ 2.\" 3.\" Id: racoonctl.8,v 1.6 2006/05/07 21:32:59 manubsd Exp 4.\" 5.\" Copyright (C) 2004 Emmanuel Dreyfus 6.\" All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. Neither the name of the project nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.Dd March 12, 2009 33.Dt RACOONCTL 8 34.Os 35.\" 36.Sh NAME 37.Nm racoonctl 38.Nd racoon administrative control tool 39.\" 40.Sh SYNOPSIS 41.Nm 42.Op opts 43reload-config 44.Nm 45.Op opts 46show-schedule 47.Nm 48.Op opts 49show-sa 50.Op isakmp|esp|ah|ipsec 51.Nm 52.Op opts 53get-sa-cert 54.Op inet|inet6 55.Ar src dst 56.Nm 57.Op opts 58flush-sa 59.Op isakmp|esp|ah|ipsec 60.Nm 61.Op opts 62delete-sa 63.Ar saopts 64.Nm 65.Op opts 66establish-sa 67.Op Fl w 68.Op Fl n Ar remoteconf 69.Op Fl u Ar identity 70.Ar saopts 71.Nm 72.Op opts 73vpn-connect 74.Op Fl u Ar identity 75.Ar vpn_gateway 76.Nm 77.Op opts 78vpn-disconnect 79.Ar vpn_gateway 80.Nm 81.Op opts 82show-event 83.Nm 84.Op opts 85logout-user 86.Ar login 87.\" 88.Sh DESCRIPTION 89.Nm 90is used to control 91.Xr racoon 8 92operation, if ipsec-tools was configured with adminport support. 93Communication between 94.Nm 95and 96.Xr racoon 8 97is done through a UNIX socket. 98By changing the default mode and ownership 99of the socket, you can allow non-root users to alter 100.Xr racoon 8 101behavior, so do that with caution. 102.Pp 103The following general options are available: 104.Bl -tag -width Ds 105.It Fl d 106Debug mode. 107Hexdump sent admin port commands. 108.It Fl l 109Increase verbosity. 110Mainly for show-sa command. 111.It Fl s Ar socket 112Specify unix socket name used to connecting racoon. 113.El 114.\" 115.Pp 116The following commands are available: 117.Bl -tag -width Ds 118.It reload-config 119This should cause 120.Xr racoon 8 121to reload its configuration file. 122.It show-schedule 123Unknown command. 124.It show-sa Op isakmp|esp|ah|ipsec 125Dump the SA: All the SAs if no SA class is provided, or either ISAKMP SAs, 126IPsec ESP SAs, IPsec AH SAs, or all IPsec SAs. 127Use 128.Fl l 129to increase verbosity. 130.It get-sa-cert Oo inet|inet6 Oc Ar src dst 131Output the raw certificate that was used to authenticate the phase 1 132matching 133.Ar src 134and 135.Ar dst . 136.It flush-sa Op isakmp|esp|ah|ipsec 137is used to flush all SAs if no SA class is provided, or a class of SAs, 138either ISAKMP SAs, IPsec ESP SAs, IPsec AH SAs, or all IPsec SAs. 139.It establish-sa Oo Fl w Oc Oo Fl n Ar remoteconf Oc Oo Fl u Ar username \ 140Oc Ar saopts 141Establish an SA, either an ISAKMP SA, IPsec ESP SA, or IPsec AH SA. 142The optional 143.Fl u Ar username 144can be used when establishing an ISAKMP SA while hybrid auth is in use. 145The exact remote block to use can be specified with 146.Fl n Ar remoteconf . 147.Nm 148will prompt you for the password associated with 149.Ar username 150and these credentials will be used in the Xauth exchange. 151.Pp 152Specifying 153.Fl w 154will make racoonctl wait until the SA is actually established or 155an error occurs. 156.Pp 157.Ar saopts 158has the following format: 159.Bl -tag -width Bl 160.It isakmp {inet|inet6} Ar src Ar dst 161.It {esp|ah} {inet|inet6} Ar src/prefixlen/port Ar dst/prefixlen/port 162{icmp|tcp|udp|gre|any} 163.El 164.It vpn-connect Oo Fl u Ar username Oc Ar vpn_gateway 165This is a particular case of the previous command. 166It will establish an ISAKMP SA with 167.Ar vpn_gateway . 168.It delete-sa Ar saopts 169Delete an SA, either an ISAKMP SA, IPsec ESP SA, or IPsec AH SA. 170.It vpn-disconnect Ar vpn_gateway 171This is a particular case of the previous command. 172It will kill all SAs associated with 173.Ar vpn_gateway . 174.It show-event 175Listen for all events reported by 176.Xr racoon 8 . 177.It logout-user Ar login 178Delete all SA established on behalf of the Xauth user 179.Ar login . 180.El 181.Pp 182Command shortcuts are available: 183.Bl -tag -width XXX -compact -offset indent 184.It rc 185reload-config 186.It ss 187show-sa 188.It sc 189show-schedule 190.It fs 191flush-sa 192.It ds 193delete-sa 194.It es 195establish-sa 196.It vc 197vpn-connect 198.It vd 199vpn-disconnect 200.It se 201show-event 202.It lu 203logout-user 204.El 205.\" 206.Sh RETURN VALUES 207The command should exit with 0 on success, and non-zero on errors. 208.\" 209.Sh FILES 210.Bl -tag -width 30n -compact 211.It Pa /var/racoon/racoon.sock No or 212.It Pa /var/run/racoon.sock 213.Xr racoon 8 214control socket. 215.El 216.\" 217.Sh SEE ALSO 218.Xr ipsec 4 , 219.Xr racoon 8 220.Sh HISTORY 221Once was 222.Ic kmpstat 223in the KAME project. 224It turned into 225.Nm 226but remained undocumented for a while. 227.An Emmanuel Dreyfus Aq Mt manu@NetBSD.org 228wrote this man page. 229