ipsec.conf.5
来自「ipsec vpn」· 5 代码 · 共 1,431 行 · 第 1/3 页
5
1,431 行
for either, and.B neverif negotiation is never to be attempted or accepted (useful for shunt-only conns).Digital signatures are superior in every way to shared secrets..TP.B leftidhowthe left participantshould be identified for authentication;defaults to.BR left .Can be an IP address (in any.IR ipsec_ttoaddr (3)syntax)or a fully-qualified domain name preceded by.B @(which is used as a literal string and not resolved).The magic value.B %myidstands for the current setting of \fImyid\fP.This is set in \fBconfig setup\fP or by \fIipsec_whack\fP(8)), or, if not set,it is the IP address in \fB%defaultroute\fP (if that is supported by a TXT record in its reverse domain), or otherwiseit is the system's hostname (if that is supported by a TXT record in its forward domain), or otherwise it is undefined..TP.B leftrsasigkeythe left participant'spublic key for RSA signature authentication,in RFC 2537 format using.IR ipsec_ttodata (3)encoding.The magic value.B %nonemeans the same as not specifying a value (useful to override a default).The value.B %dnsondemand(the default)means the key is to be fetched from DNS at the time it is needed.The value.B %dnsonloadmeans the key is to be fetched from DNS at the timethe connection description is read from.IR ipsec.conf ;currently this will be treated as.B %noneif.B right=%anyor.BR right=%opportunistic .The value.B %dnsis currently treated as.B %dnsonloadbut will change to.B %dnsondemandin the future.The identity used for the left participantmust be a specific host, not.B %anyor another magic value.The value .B %certwill load the information required from a certificate defined in.B %leftcertand automatically define leftid for you..B Caution:if two connection descriptionsspecify different public keys for the same.BR leftid ,confusion and madness will ensue..TP.B leftrsasigkey2if present, a second public key.Either key can authenticate the signature, allowing for key rollover..TP.BR leftcertIf you are using .B leftrsasigkey=%certthis defines the certificate you would like to use. It should point to a X.509encoded certificate file. If you do not specify a full pathname, by default itwill look in /etc/ipsec.d/certs..TP.BR leftsendcertThis option configures when Openswan will send X.509 certificates to the remotehost. Acceptable values are .B yes|always(signifying that we should always send a certificate),.B ifasked(signifying that we should send a certificate if the remote end asks for it), and.B no|never(signifying that we will never send a X.509 certificate).The default for this option is .B ifaskedwhich may break compatibility with other vendor's IPSec implementations, such asCisco and SafeNet. If you find that you are getting errors about no ID/Key found,you likely need to set this to.B always..TP.B aggrmodeUse aggressive mode ISAKMP negotiation. The default ismain mode. Aggressive mode is less secure than main mode as it revealsyour identity to an eavesdropper, but is needed to support road warriorsusing PSK keys or to interoperate with other buggy implementations insistingon using aggressive mode..TP.B xauthUse XAUTH / Mode Config for this connection. This uses PAM for authenticationcurrently, and it not well documented. Use the source :) Acceptable values are.B yesor .B no(the default)..TP.B dpddelaySet the delay (in seconds) between Dead Peer Dectection(RFC 3706) keepalives (R_U_THERE, R_U_THERE_ACK)that are sent for this connection (default.B 30seconds). If dpdtimeout is set, but not dpddelay, dpddelay will be setto the default..TP.B dpdtimeout Set the length of time (in seconds) we will idle without hearing either anR_U_THERE poll from our peer, or an R_U_THERE_ACK reply. After this periodhas elapsed with no response and no traffic, we will declare the peer dead,and remove the SA (default.B 120seconds). If dpddelay is set, but not dpdtimeout, dpdtimeout will be setto the default..TP.B dpdactionWhen a DPD enabled peer is declared dead, what action should be taken..B hold (default) means the eroute will be put into %hold status, while .B clear means the eroute and SA with both be cleared. dpdaction=clear is really only usefull on the server of a Road Warrior config..TP.B pfswhether Perfect Forward Secrecy of keys is desired on the connection'skeying channel(with PFS, penetration of the key-exchange protocoldoes not compromise keys negotiated earlier);acceptable values are.B yes(the default)and.BR no ..TP.B keylifehow long a particular instance of a connection(a set of encryption/authentication keys for user packets) should last,from successful negotiation to expiry;acceptable values are an integer optionally followed by.BR s(a time in seconds)or a decimal number followed by.BR m ,.BR h ,or.B d(a timein minutes, hours, or days respectively)(default.BR 8.0h ,maximum.BR 24h ).Normally, the connection is renegotiated (via the keying channel)before it expires.The two ends need not exactly agree on.BR keylife ,although if they do not,there will be some clutter of superseded connections on the endwhich thinks the lifetime is longer..TP.B rekeywhether a connection should be renegotiated when it is about to expire;acceptable values are.B yes(the default)and.BR no .The two ends need not agree,but while a value of.B noprevents Pluto from requesting renegotiation,it does not prevent responding to renegotiation requested from the other end,so.B nowill be largely ineffective unless both ends agree on it..TP.B rekeymarginhow long before connection expiry or keying-channel expiryshould attempts tonegotiate a replacementbegin; acceptable values as for.B keylife(default.BR 9m ).Relevant only locally, other end need not agree on it..TP.B rekeyfuzzmaximum percentage by which.B rekeymarginshould be randomly increased to randomize rekeying intervals(important for hosts with many connections);acceptable values are an integer,which may exceed 100,followed by a `%'(default set by.IR ipsec_pluto (8),currently.BR 100% ).The value of.BR rekeymargin ,after this random increase,must not exceed.BR keylife .The value.B 0%will suppress time randomization.Relevant only locally, other end need not agree on it..TP.B keyingtrieshow many attempts (a whole number or \fB%forever\fP) should be made tonegotiate a connection, or a replacement for one, before giving up(default.BR %forever ).The value \fB%forever\fPmeans ``never give up'' (obsolete: this can be written \fB0\fP).Relevant only locally, other end need not agree on it..TP.B ikelifetimehow long the keying channel of a connection (buzzphrase: ``ISAKMP SA'')should last before being renegotiated;acceptable values as for.B keylife(default set by.IR ipsec_pluto (8),currently.BR 1h ,maximum.BR 8h ).The two-ends-disagree case is similar to that of.BR keylife ..TP.B compresswhether IPComp compression of content is proposed on the connection(link-level compression does not work on encrypted data,so to be effective, compression must be done \fIbefore\fR encryption);acceptable values are.B yesand.B no(the default).The two ends need not agree.A value of.B yescauses IPsec to propose both compressed and uncompressed,and prefer compressed.A value of.B noprevents IPsec from proposing compression;a proposal to compress will still be accepted..TP.B disablearrivalcheckwhether KLIPS's normal tunnel-exit check(that a packet emerging from a tunnel has plausible addresses in its header)should be disabled;acceptable values are.B yesand.B no(the default).Tunnel-exit checks improve security and do not break any normal configuration.Relevant only locally, other end need not agree on it..TP.B failureshuntwhat to do with packets when negotiation fails.The default is.BR none :no shunt;.BR passthrough ,.BR drop ,and.B rejecthave the obvious meanings..SS "CONN PARAMETERS: MANUAL KEYING"The following parameters are relevant only to manual keying,and are ignored in automatic keying.Unless otherwise noted,for a connection to work,in general it is necessary for the two ends to agree exactlyon the values of these parameters.A manually-keyedconnection must specify at least one of AH or ESP..TP 14.B spi(this or.B spibaserequired for manual keying)the SPI number to be used for the connection (see.IR ipsec_manual (8));must be of the form \fB0x\fIhex\fB\fR,where.I hexis one or more hexadecimal digits(note, it will generally be necessary to make.I spiat least.B 0x100to be acceptable to KLIPS,and use of SPIs in the range.BR 0x100 - 0xfffis recommended).TP 14.B spibase(this or.B spirequired for manual keying)the base number for the SPIs to be used for the connection (see.IR ipsec_manual (8));must be of the form \fB0x\fIhex\fB0\fR,where.I hexis one or more hexadecimal digits(note, it will generally be necessary to make.I spibaseat least.B 0x100for the resulting SPIsto be acceptable to KLIPS,and use of numbers in the range.BR 0x100 - 0xff0is recommended).TP.B espESP encryption/authentication algorithm to be usedfor the connection, e.g..B 3des-md5-96(must be suitable as a value of.IR ipsec_spi (8)'s.B \-\-espoption);default is not to use ESP.TP.B espenckeyESP encryption key(must be suitable as a value of.IR ipsec_spi (8)'s.B \-\-enckeyoption)(may be specified separately for each direction using.B leftespenckey(leftward SA)and.B rightespenckeyparameters).TP.B espauthkeyESP authentication key(must be suitable as a value of.IR ipsec_spi (8)'s.B \-\-authkeyoption)(may be specified separately for each direction using.B leftespauthkey(leftward SA)and.B rightespauthkeyparameters).TP.B espreplay_windowESP replay-window setting,an integer from.B 0(the.IR ipsec_manualdefault, which turns off replay protection) to.BR 64 ;relevant only if ESP authentication is being used.TP.B leftespspiSPI to be used for the leftward ESP SA, overridingautomatic assignment using.B spior.BR spibase ;typically a hexadecimal number beginning with.B 0x.TP.B ahAH authentication algorithm to be usedfor the connection, e.g..B hmac-md5-96(must be suitable as a value of.IR ipsec_spi (8)'s.B \-\-ahoption);default is not to use AH.TP.B ahkey(required if.B ahis present) AH authentication key(must be suitable as a value of.IR ipsec_spi (8)'s.B \-\-authkeyoption)(may be specified separately for each direction using.B leftahkey(leftward SA)and.B rightahkeyparameters).TP.B ahreplay_windowAH replay-window setting,an integer from.B 0(the.I ipsec_manualdefault, which turns off replay protection) to.B 64.TP.B leftahspiSPI to be used for the leftward AH SA, overridingautomatic assignment using.B spior.BR spibase ;typically a hexadecimal number beginning with.B 0x.SH "CONFIG SECTIONS"At present, the only.B configsection known to the IPsec software is the one named.BR setup ,which contains information used when the software is being started(see.IR ipsec_setup (8)).Here's an example:.PP.ne 8.nf.ft B.ta 1cconfig setup interfaces="ipsec0=eth1 ipsec1=ppp0" klipsdebug=none plutodebug=all manualstart=.ft.fi.PPParameters are optional unless marked ``(required)''.The currently-accepted.I parameternames in a.B config.B setupsection are:.TP 14.B myidthe identity to be used for.BR %myid ..B %myidis used in the implicit policy group conns and can be used asan identity in explicit conns.If unspecified,.B %myidis set to the IP address in \fB%defaultroute\fP (if that is supported by a TXT record in its reverse domain), or otherwisethe system's hostname (if that is supported by a TXT record in its forward domain), or otherwise it is undefined.An explicit value generally starts with ``\fB@\fP''..TP.B interfacesvirtual and physical interfaces for IPsec to use:
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?