remote (address | anonymous) [[port]] [inherit parent] { statements }
specifies the parameters for IKE phase 1 for each remote node.
The default port is 500. If anonymous is specified, the state-
ments apply to all peers which do not match any other remote
directive.
Sections with inherit parent statements (where parent is either
address or a keyword anonymous) have all values predefined to
those of a given parent. In these sections it is enough to rede-
fine only the changed parameters.
The following are valid statements.
exchange_mode (main | aggressive | base);
defines the exchange mode for phase 1 when racoon is the
initiator. It also means the acceptable exchange mode
when racoon is responder. More than one mode can be
specified by separating them with a comma. All of the
modes are acceptable. The first exchange mode is what
racoon uses when it is the initiator.
doi ipsec_doi;
means to use IPsec DOI as specified in RFC 2407. You can
omit this statement.
situation identity_only;
means to use SIT_IDENTITY_ONLY as specified in RFC 2407.
You can omit this statement.
identifier idtype;
is obsolete. Instead, use my_identifier.
my_identifier [qualifier] idtype ...;
specifies the identifier sent to the remote host and the
type to use in the phase 1 negotiation. address, fqdn,
user_fqdn, keyid, and asn1dn can be used as an idtype;
the qualifier is currently only used for keyid, and can
be either file or tag. The possible values are :
my_identifier address [address];
the type is the IP address. This is the default
type if you do not specify an identifier to use.
my_identifier user_fqdn string;
the type is a USER_FQDN (user fully-qualified
domain name).
my_identifier fqdn string;
the type is a FQDN (fully-qualified domain name).
my_identifier keyid [file] file;
the type is a KEY_ID, read from the file.
my_identifier keyid tag string;
the type is a KEY_ID, specified in the quoted
string.
my_identifier asn1dn [string];
the type is an ASN.1 distinguished name. If
string is omitted, racoon(8) will get the DN from
the Subject field in the certificate.
xauth_login [string];
specifies the login to use in client-side Hybrid authen-
tication. It is available only if racoon(8) has been
built with this option. The associated password is
looked up in the pre-shared key files, using the login
string as the key id.
peers_identifier idtype ...;
specifies the peer's identifier to be received. If it is
not defined then racoon(8) will not verify the peer's
identifier in ID payload transmitted from the peer. If
it is defined, the behavior of the verification depends
on the flag of verify_identifier. The usage of idtype is
the same as my_identifier except that the individual com-
ponent values of an asn1dn identifier may specified as *
to match any value
(e.g. "C=XX, O=MyOrg, OU=*, CN=Mine").
Alternative acceptable peer identifiers may be specified
by repeating the peers_identifier statement.
verify_identifier (on | off);
If you want to verify the peer's identifier, set this to
on. In this case, if the value defined by
peers_identifier is not the same as the peer's identifier
in the ID payload, the negotiation will failed. The
default is off.
certificate_type certspec;
specifies a certificate specification. certspec is one
of followings:
x509 certfile privkeyfile;
certfile means a file name of a certificate.
privkeyfile means a file name of a secret key.
ca_type cacertspec;
specifies a root certificate authority specification.
cacertspec is one of followings:
x509 cacertfile;
cacertfile means a file name of the root certifi-
cate authority. Default is /etc/openssl/cert.pem
mode_cfg (on | off);
Gather network information through ISAKMP mode
configuration. Default is off.
weak_phase1_check (on | off);
Tells racoon to act on unencrypted deletion messages on
phase 1. This is a small security risk, so the default
is off, meaning that racoon will keep on trying to estab-
lish a connection even if the user credentials ar wrong,
for instance.
peers_certfile (dnssec | certfile);
If dnssec is defined, racoon(8) will ignore the CERT pay-
load from the peer, and try to get the peer's certificate
from DNS instead. If certfile is defined, racoon(8) will
ignore the CERT payload from the peer, and will use this
certificate as the peer's certificate.
script script phase1_up
script script phase1_down
Shell scripts that get executed when a phase 1 SA goes up
or down. Both scripts get either phase1_up or
phase1_down as first argument, and the following vari-
ables are set in their environment:
LOCAL_ADDR
The local address of the phase 1 SA.
LOCAL_PORT
The local port used for IKE for the phase 1 SA.
REMOTE_ADDR
The remote address of the phase 1 SA.
REMOTE_PORT
The remote port used for IKE for the phase 1 SA.
The following variables are only set if mode_cfg was
enabled:
INTERNAL_ADDR4
An IPv4 internal address obtained by ISAKMP mode
config.
INTERNAL_NETMASK4
An IPv4 internal netmask obtained by ISAKMP mode
config.
INTERNAL_CIDR4
An IPv4 internal netmask obtained by ISAKMP mode
config, in CIDR notation.
INTERNAL_DNS4
The first internal DNS server IPv4 address
obtained by ISAKMP mode config.
INTERNAL_DNS4_LIST
A list of internal DNS servers IPv4 address
obtained by ISAKMP mode config, separated by spa-
ces.
INTERNAL_WINS4
The first internal WINS server IPv4 address
obtained by ISAKMP mode config.
INTERNAL_WINS4_LIST
A list of internal WINS servers IPv4 address
obtained by ISAKMP mode config, separated by spa-
ces.
SPLIT_INCLUDE
The space separated list of IPv4 addresses and
masks (address slash mask) that define the net-
works to be encrypted (as opposed to the default
where all the traffic should be encrypted) ;
obtained by ISAKMP mode config ; SPLIT_INCLUDE
and SPLIT_LOCAL are mutually exclusive.
SPLIT_LOCAL
The space separated list of IPv4 addresses and
masks (address slash mask) that define the net-
works to be considered local, and thus excluded
from the tunnels ; obtained by ISAKMP mode con-
fig.
DEFAULT_DOMAIN
The DNS default domain name obtained by ISAKMP
mode config.
send_cert (on | off);
If you do not want to send a certificate for some reason,
set this to off. The default is on.
send_cr (on | off);
If you do not want to send a certificate request for some
reason, set this to off. The default is on.
verify_cert (on | off);
If you do not want to verify the peer's certificate for
some reason, set this to off. The default is on.
lifetime time number timeunit;
Define a lifetime of a certain time which will be pro-
posed in the phase 1 negotiations. Any proposal will be
accepted, and the attribute(s) will be not proposed to
the peer if you do not specify it (them). They can be
individually specified in each proposal.
ike_frag (on | off);
Enable receiver-side IKE fragmentation, if racoon(8) has
been built with this feature. This extension is there to
work around broken firewalls that do not work with frag-
mented UDP packets. IKE fragmentation is always enabled
on the sender-side, and it is used if the peer advertises
itself as IKE fragmentation capable.
esp_frag fraglen;
This option is only relevant if you use NAT traversal in
tunnel mode. Its purpose is to work around broken DSL
routers that reject UDP fragments, by fragmenting the IP
packets before ESP encapsulation. The result is ESP over
UDP of fragmented packets instead of fragmented ESP over
UDP packets (i.e., IP:UDP:ESP:frag(IP) instead of
frag(IP:UDP:ESP:IP)). fraglen is the maximum size of the
fragments. 552 should work anywhere, but the higher
fraglen is, the better is the performance.
Note that because PMTU discovery is broken on many sites,
you will have to use MSS clamping if you want TCP to work
correctly.
initial_contact (on | off);
enable this to send an INITIAL-CONTACT message. The
default value is on. This message is useful only when
the implementation of the responder chooses an old SA
when there are multiple SAs with different established
time, and the initiator reboots. If racoon did not send
the message, the responder would use an old SA even when
a new SA was established. The KAME stack has the switch
in the system wide value net.key.preferred_oldsa. when
the value is zero, the stack always uses a new SA.
passive (on | off);
If you do not want to initiate the negotiation, set this
to on. The default value is off. It is useful for a
server.
proposal_check level;
specifies the action of lifetime length and PFS of the
phase 2 selection on the responder side, and the action
of lifetime check in phase 1. The default level is
strict. If the level is:
obey the responder will obey
the initiator anytime.
strict If the responder's
length is longer than the ini-
tiator's
one, the responder uses the initiator's
one.
Otherwise it rejects the proposal. If PFS
is
not required by the responder, the responder
will
obey the proposal. If PFS is required by
both
sides and if the responder's group is not
equal
to the initiator's one, then the responder
will
reject the proposal.
claim If the responder's length
is longer than the ini-
tiator's
one, the responder will use the initia-
tor's
one. If the responder's length is shorter
than
the initiator's one, the responder uses its
own
length AND sends a RESPONDER-LIFETIME
notify
message to an initiator in the case of lifetime
(phase
2 only). For PFS, this directive behaves
the
same as strict.
exact If the initiator's length
is not equal to the
responder's
one, the responder will reject the
proposal.
If PFS is required by both sides and
if
the responder's group is not equal to the ini-
tiator's
one, then the responder will reject the
proposal.
support_proxy (on | off);
If this value is set to on, then both values of ID pay-
loads in the phase 2 exchange are always used as the
addresses of end-point of IPsec-SAs. The default is off.
generate_policy (on | off | require | unique);
This directive is for the responder. Therefore you
should set passive to on in order that racoon(8) only
becomes a responder. If the responder does not have any
policy in SPD during phase 2 negotiation, and the direc-
tive is set to on, then racoon(8) will choose the first
proposal in the SA payload from the initiator, and gener-
ate policy entries from the proposal. It is useful to
negotiate with clients whose IP address is allocated
dynamically. Note that an inappropriate policy might be
installed into the responder's SPD by the initiator, so
other communications might fail if such policies are
installed due to a policy mismatch between the initiator
and the responder. on and require values means the same
thing (generate a require policy). unique tells racoon
to set up unique policies, with a monotoning increasing
reqid number between 1 and IPSEC_MANUAL_REQID_MAX).
This directive is ignored in the initiator case. The default
value is off.
nat_traversal (on | off | force);
This directive enables use of the NAT-Traversal IPsec
extension (NAT-T). NAT-T allows one or both peers to
reside behind a NAT gateway (i.e., doing address- or
port-translation). Presence of NAT gateways along the
path is discovered during phase 1 handshake and if found,
NAT-T is negotiated. When NAT-T is in charge, all ESP
and AH packets of a given connection are encapsulated
into UDP datagrams (port 4500, by default). Possible
values are:
on NAT-T
is used when a NAT gateway is detected
between
the peers.
off NAT-T
is not proposed/accepted. This is the
default.
force NAT-T is used regardless
if a NAT is detected
between
the peers or not.
Please note that NAT-T support is a compile-time option.
Although it is enabled in the source distribution by
default, it may not be available in your particular
build. In that case you will get a warning when using
any NAT-T related config options.
dpd_delay delay;
This option activates the DPD and sets the time (in sec-
onds) allowed between 2 proof of liveness requests. The
default value is 0, which disables DPD monitoring, but
still negotiates DPD support.
dpd_retry delay;
If dpd_delay is set, this sets the delay (in seconds) to
wait for a proof of liveness before considering it as
failed and send another request. The default value is 5.
dpd_maxfail number;
If dpd_delay is set, this sets the maximum number of
proof of liveness to request (without reply) before con-
sidering the peer is dead. The default value is 5.
nonce_size number;
define the byte size of nonce value. Racoon can send any
value although RFC2409 specifies that the value MUST be
between 8 and 256 bytes. The default size is 16 bytes.
proposal { sub-substatements }
encryption_algorithm algorithm;
specify the encryption algorithm used for the
phase 1 negotiation. This directive must be
defined. algorithm is one of following: des,
3des, blowfish, cast128, aes for Oakley. For
other transforms, this statement should not be
used.
hash_algorithm algorithm;
define the hash algorithm used for the phase 1
negotiation. This directive must be defined.
algorithm is one of following: md5, sha1, sha256,
sha384, sha512 for Oakley.
authentication_method type;
defines the authentication method used for the
phase 1 negotiation. This directive must be
defined. type is one of: pre_shared_key, rsasig,
gssapi_krb, hybrid_rsa_server, hybrid_rsa_client,
xauth_rsa_server, xauth_rsa_client,
xauth_psk_server or xauth_psk_client.
dh_group group;
define the group used for the Diffie-Hellman
exponentiations. This directive must be defined.
group is one of following: modp768, modp1024,
modp1536, modp2048, modp3072, modp4096, modp6144,
modp8192. Or you can define 1, 2, 5, 14, 15,
16,
17, or 18 as the DH group number. When you want
to use aggressive mode, you must define the same
DH group in each proposal.
lifetime time number timeunit;
define lifetime of the phase 1 SA proposal.
Refer to the description of the lifetime direc-
tive defined in the remote directive.
gss_id string;
define the GSS-API endpoint name, to be included
as an attribute in the SA, if the gssapi_krb
authentication method is used. If this is not
defined, the default value of `host/hostname' is
used, where hostname is the value returned by the
hostname(1) command.