⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spi.8

📁 ipsec vpn
💻 8
字号:
.TH IPSEC_SPI 8 "23 Oct 2001".\".\" RCSID $Id: spi.8,v 1.32 2002/04/24 07:35:40 mcr Exp $.\".SH NAMEipsec spi \- manage IPSEC Security Associations.SH SYNOPSIS.brNote: In the following,.br.B <SA>means:.B \-\-af(inet | inet6).B \-\-edstdaddr.B \-\-spispi.B \-\-protoproto OR .B \-\-saidsaid,.br.B <life>means:.B \-\-life(soft | hard)\-(allocations | bytes | addtime | usetime | packets)=value[,...].PP.B ipsec.B spi.PP.B ipsec.B spi.B <SA>.B \-\-srcsrc.B \-\-ah.BR hmac-md5-96 | hmac-sha1-96[.B \-\-replay_windowreplayw ][.B <life>].B \-\-authkeyakey.PP.B ipsec.B spi.B <SA>.B \-\-srcsrc.B \-\-esp.BR 3des[.B \-\-replay_windowreplayw ][.B <life>].B \-\-enckeyekey.PP.B ipsec.B spi.B <SA>.B \-\-srcsrc.B \-\-esp.BR 3des-md5-96 | 3des-sha1-96[.B \-\-replay_windowreplayw ][.B <life>].B \-\-enckeyekey.B \-\-authkeyakey.PP.B ipsec.B spi.B <SA>.B \-\-srcsrc.B \-\-comp.BR deflate.PP.B ipsec.B spi.B <SA>.B \-\-ip4.B \-\-srcencap-src.B \-\-dstencap-dst.PP.B ipsec.B spi.B <SA>.B \-\-ip6.B \-\-srcencap-src.B \-\-dstencap-dst.PP.B ipsec.B spi.B <SA>.B \-\-del.PP.B ipsec.B spi.B \-\-help.PP.B ipsec.B spi.B \-\-version.PP.B ipsec.B spi.B \-\-clear.PP.SH DESCRIPTION.I Spicreates and deletes IPSEC Security Associations.A Security Association (SA) is a transform through which packetcontents are to be processed before being forwarded.A transform can be an IPv4-in-IPv4 or an IPv6-in-IPv6 encapsulation,an IPSEC Authentication Header (authentication with no encryption),or an IPSEC Encapsulation Security Payload (encryption, possiblyincluding authentication)..PPWhen a packet is passed from a higher networking layerthrough an IPSEC virtual interface,a search in the extended routing table (see.IR ipsec_eroute (8))yields an effective destination address, aSecurity Parameters Index (SPI) and a IP protocol number.When an IPSEC packet arrives from the network,its ostensible destination, an SPI and an IP protocolspecified by its outermost IPSEC header are used.The destination/SPI/protocol combination is used to select a relevant SA.(See.IR ipsec_spigrp (8)for discussion of how multiple transforms are combined.).PPThe.IR af ,.IR daddr ,.I spiand.I protoarguments specify the SA to be created or deleted..I afis the address family (inet for IPv4, inet6 for IPv6)..I Daddris a destination addressin dotted-decimal notation for IPv4 or in a coloned hex notation for IPv6..I Spiis a number, preceded by '0x' for hexadecimal,between.B 0x100and.BR 0xffffffff ;values from.B 0x0to.B 0xffare reserved..I Protois an ASCII string, "ah", "esp", "comp" or "tun", specifying the IP protocol.The protocol must agree with the algorithm selected..PPAlternatively, the.I saidargument can also specify an SA to be created or deleted..I Saidcombines the three parameters above, such as: "tun.101@1.2.3.4" or "tun:101@1:2::3:4",where the address family is specified by "." for IPv4 and ":" for IPv6. The addressfamily indicators substitute the "0x" for hexadecimal..PPThe source address,.IR src ,must also be provided for the inbound policy check tofunction.  The source address does not need to be included if inboundpolicy checking has been disabled..PPKeys vectors must be entered as hexadecimal or base64 numbers.They should be cryptographically strong random numbers..PPAll hexadecimal numbers are entered as strings of hexadecimal digits(0-9 and a-f), without spaces, preceded by '0x', where each hexadecimaldigit represents 4 bits.All base64 numbers are entered as strings of base64 digits (0-9, A-Z, a-z, '+' and '/'), without spaces, preceded by '0s',where each hexadecimal digit represents 6 bits and '=' is used for padding..PPThe deletion of an SA which has been grouped will result in the entire chainbeing deleted..PPThe form with no additional arguments lists the contents of/proc/net/ipsec_spi.  The format of /proc/net/ipsec_spi is discussed inipsec_spi(5)..PPThe lifetime severity of.B softsets a limit when the key management daemons are asked to rekey the SA.The lifetime severity of.B hardsets a limit when the SA must expire.The lifetime type.B allocationstells the system when to expire the SA because it is being shared by too manyeroutes (not currently used).  The lifetime type of.B bytestells the system to expire the SA after a certain number of bytes have beenprocessed with that SA.  The lifetime type of.B addtimetells the system to expire the SA a certain number of seconds after the SA wasinstalled.  The lifetime type of.B usetimetells the system to expire the SA a certain number of seconds after that SA hasprocessed its first packet.  The lifetime type of.B packetstells the system to expire the SA after a certain number of packets have beenprocessed with that SA..SH OPTIONS.TP 10.B \-\-afspecifies the address family (inet for IPv4, inet6 for IPv6).TP.B \-\-edstspecifies the effective destination.I daddrof the Security Association.TP.B \-\-spispecifies the Security Parameters Index.I spiof the Security Association.TP.B \-\-protospecifies the IP protocol.I protoof the Security Association.TP.B \-\-saidspecifies the Security Association in monolithic format.TP.B \-\-ahadd an SA for an IPSEC Authentication Header,specified by the following transform identifier(\c.BR hmac-md5-96or.BR hmac-sha1-96 )(RFC2402, obsoletes RFC1826).TP.B hmac-md5-96transform following the HMAC and MD5 standards,using a 128-bit.I keyto produce a 96-bit authenticator (RFC2403).TP.B hmac-sha1-96transform following the HMAC and SHA1 standards,using a 160-bit.I keyto produce a 96-bit authenticator (RFC2404).TP.B \-\-espadd an SA for an IPSEC Encapsulation Security Payload,specified by the followingtransform identifier (\c.BR 3des ,or.BR 3des-md5-96 )(RFC2406, obsoletes RFC1827).TP.B 3desencryption transform following the Triple-DES standard inCipher-Block-Chaining mode using a 64-bit.I iv(internally generated) and a 192-bit 3DES.I ekey(RFC2451).TP.B 3des-md5-96encryption transform following the Triple-DES standard inCipher-Block-Chaining mode with authentication provided byHMAC and MD5(96-bit authenticator),using a 64-bit.IR iv(internally generated), a 192-bit 3DES.I ekeyand a 128-bit HMAC-MD5.I akey(RFC2451, RFC2403).TP.B 3des-sha1-96encryption transform following the Triple-DES standard inCipher-Block-Chaining mode with authentication provided byHMAC and SHA1(96-bit authenticator),using a 64-bit.IR iv(internally generated), a 192-bit 3DES.I ekeyand a 160-bit HMAC-SHA1.I akey(RFC2451, RFC2404).TP.BR \-\-replay_window " replayw"sets the replay window size; valid values are decimal, 1 to 64.TP.BR \-\-life " life_param[,life_param]"sets the lifetime expiry; the format of.B life_paramconsists of a comma-separated list of lifetime specifications without spaces;a lifetime specification is comprised of a severity of.BR soft " or " hardfollowed by a '-', followed by a lifetime type of.BR allocations ", " bytes ", " addtime ", " usetime " or " packetsfollowed by an '=' and finally by a value.TP.B \-\-compadd an SA for IPSEC IP Compression,specified by the followingtransform identifier (\c.BR deflate )(RFC2393).TP.B deflatecompression transform following the patent-free Deflate compression algorithm(RFC2394).TP.B \-\-ip4add an SA for an IPv4-in-IPv4tunnel from.I encap-srcto.I encap-dst.TP.B \-\-ip6add an SA for an IPv6-in-IPv6tunnel from.I encap-srcto.I encap-dst.TP.B \-\-srcspecify the source end of an IP-in-IP tunnel from.I encap-srcto.I encap-dstand also specifies the source address of the Security Association to beused in inbound policy checking and must be the same addressfamily as.I afand.I edst.TP.B \-\-dstspecify the destination end of an IP-in-IP tunnel from.I encap-srcto.I encap-dst.TP.B \-\-deldelete the specified SA.TP.BR \-\-clearclears the table of.BR SA s.TP.BR \-\-helpdisplay synopsis.TP.BR \-\-versiondisplay version information.SH EXAMPLESTo keep line lengths down and reduce clutter,some of the long keys in these examples have been abbreviatedby replacing part of their text with.RI `` ... ''.Keys used when the programs are actually run must,of course, be the full length required for the particular algorithm..LP.B "ipsec spi \-\-af inet \-\-edst gw2 \-\-spi 0x125 \-\-proto esp \e".br.B "   \-\-src gw1 \e".br.B "   \-\-esp 3des\-md5\-96 \e".br.BI "\ \ \ \-\-enckey\ 0x6630" "..." "97ce\ \e".br.BI "   \-\-authkey 0x9941" "..." "71df".LPsets up an SA from.BR gw1to.BR gw2with an SPI of .BR 0x125and protocol.BR ESP(50) using.BR 3DESencryption with integral.BR MD5-96authentication transform, using an encryption key of.BI 0x6630 ... 97ceand an authentication key of.BI 0x9941 ... 71df(see note above about abbreviated keys)..LP.B "ipsec spi \-\-af inet6 \-\-edst 3049:9::9000:3100 \-\-spi 0x150 \-\-proto ah \e".br.B "   \-\-src 3049:9::9000:3101 \e".br.B "   \-\-ah hmac\-md5\-96 \e".br.BI "\ \ \ \-\-authkey\ 0x1234" "..." "2eda\ \e".LPsets up an SA from.BR 3049:9::9000:3101to.BR 3049:9::9000:3100with an SPI of .BR 0x150and protocol.BR AH(50) using.BR MD5-96authentication transform, using an authentication key of.BI 0x1234 ... 2eda(see note above about abbreviated keys)..LP.B "ipsec spi \-\-said tun.987@192.168.100.100 \-\-del ".LPdeletes an SA to.BR 192.168.100.100with an SPI of .BR 0x987and protocol.BR IPv4-in-IPv4(4)..LP.B "ipsec spi \-\-said tun:500@3049:9::1000:1 \-\-del ".LPdeletes an SA to.BR 3049:9::1000:1with an SPI of .BR 0x500and protocol.BR IPv6-in-IPv6(4)..LP.SH FILES/proc/net/ipsec_spi, /usr/local/bin/ipsec.SH "SEE ALSO"ipsec(8), ipsec_manual(8), ipsec_tncfg(8), ipsec_eroute(8),ipsec_spigrp(8), ipsec_klipsdebug(8), ipsec_spi(5).SH HISTORYWritten for the Linux FreeS/WAN project<http://www.freeswan.org/>by Richard Guy Briggs..SH BUGSThe syntax is messy and the transform naming needs work..\".\" $Log: spi.8,v $.\" Revision 1.32  2002/04/24 07:35:40  mcr.\" Moved from ./klips/utils/spi.8,v.\".\" Revision 1.31  2001/11/06 20:18:47  rgb.\" Added lifetime parameters..\".\" Revision 1.30  2001/10/24 03:23:32  rgb.\" Added lifetime option and parameters..\".\" Revision 1.29  2001/05/30 08:14:04  rgb.\" Removed vestiges of esp-null transforms..\".\" Revision 1.28  2000/11/29 19:15:20  rgb.\" Add --src requirement for inbound policy routing..\".\" Revision 1.27  2000/09/17 18:56:48  rgb.\" Added IPCOMP support..\".\" Revision 1.26  2000/09/13 15:54:32  rgb.\" Added Gerhard's ipv6 updates..\".\" Revision 1.25  2000/09/12 22:36:45  rgb.\" Gerhard's IPv6 support..\".\" Revision 1.24  2000/06/30 18:21:55  rgb.\" Update SEE ALSO sections to include ipsec_version(5) and ipsec_pf_key(5).\" and correct FILES sections to no longer refer to /dev/ipsec which has.\" been removed since PF_KEY does not use it..\".\" Revision 1.23  2000/06/21 16:54:57  rgb.\" Added 'no additional args' text for listing contents of.\" /proc/net/ipsec_* files..\".\" Revision 1.22  1999/08/11 08:35:16  rgb.\" Update, deleting references to obsolete and insecure algorithms..\".\" Revision 1.21  1999/07/19 18:53:55  henry.\" improve font usage in key abbreviations.\".\" Revision 1.20  1999/07/19 18:50:09  henry.\" fix slightly-misformed comments.\" abbreviate long keys to avoid long-line complaints.\".\" Revision 1.19  1999/04/06 04:54:38  rgb.\" Fix/Add RCSID Id: and Log: bits to make PHMDs happy.  This includes.\" patch shell fixes..\"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -