9 Optional IPsec Configuration
Note:
Customers are NOT required to configure IPsec.9.1 IPsec Overview
Internet Protocol Security (IPsec) provides network layer security protocols for authentication, encryption, payload compression, and key exchange. IPsec provides Host-to-Host encrypted connections or Network-to-Network packet tunneling.
Network traffic between two end-points is encrypted and decrypted by authenticated hosts at the end-points, using a shared private key. The shared private key forms a Security Association that can be automatically changed using Security Policies based on traffic volume, expiry time, or other criteria.
IPsec works for both IPv4 and IPv6 on the Diameter interface. The provisioning interface only supports IPsec on IPv4. Oracle Communications Diameter Signaling Router supports IPsec with an SCTP/IPv6 configuration.
9.1.1 Encapsulating Security Payload
The Diameter Signaling Router IPsec uses the Encapsulating Security Payload (ESP) protocol for encryption and authentication. ESP uses encryption algorithms to encrypt either the packet payload or the entire packet, depending on the IPsec configuration, whether to use transport mode or tunnel mode. If the IPsec is in transport mode, only the packet payload is encrypted, and the IP header is not encrypted. If the IPsec is in tunnel mode, both the packet payload and the original IP header are encrypted, and then a new IP header is added.
ESP also provides authentication of the encrypted packets to prevent attacks by ensuring that the packet is from the correct source.
Many encryption algorithms use an Initialization Vector (IV). The IV encrypts to make each message unique. This makes it extremely difficult for cryptanalysis attempts to decrypt the ESP. For more details on the supported ESP encryption and authentication algorithms, see the Table 9-1 table.
9.1.2 Internet Key Exchange
- IKEv1:
- security associations are established in 8 messages.
- does not use a Pseudo-Random function.
- IKEv2:
- security associations are established in 4 messages.
- uses an increased number of encryption algorithms and authentication transformations.
- uses a Pseudo-Random function.
For more details on the encryption algorithms and authentication transformations that are supported for IKE, see the Table 9-1 table.
9.2 IPsec Process
When an IPsec connection is configured, you can create Security Policies using the IPsec connection configuration files. IPsec uses Security Policies to define whether to encrypt a packet or not. The Security Policies also help determine whether an IPsec procedure is needed for a connection. The Security Policies do not change over time. After the Security Policies exist and initial network connectivity has been made, the Internet Key Exchange (IKE) process occurs.
- Phase 1 acts as an initial handshake and creates the IKE security associations that determine how to set up an initial secure connection to begin the IPsec security association negotiation.
- In phase 2, the keys are exchanged, and the IPsec security associations are created. Once the IPsec security associations exist, the IPsec connection setup process is complete. IPsec now knows how to encrypt the packets.
IPsec uses security associations to determine which type of encryption algorithm and authentication transportation should be used when creating an IPsec packet, and to apply the correct decryption algorithm when a packet is received. Since security associations change with time, a lifetime parameter is used to force the security associations to expire so that IPsec must renegotiate them.
You can set up an IPsec connection on a virtual IP that can be used for HA. However, when a switchover occurs and the virtual IP is added to the new box, a SIGHUP is sent to the iked daemon on the newly active box so that the virtual IP is under iked management. Also, the switchover does not occur until the security associations have expired and the renegotiation can begin.
9.3 Setting Up IPsec
This section describes the procedure to set up IPsec.
Prerequisites
Before configuring IPsec, perform the following steps on the active NOAMP server:
- Log in as root on the active NOAMP server.
- On the active NOAMP server, run the following
commands:
iadd -xu -fallowPgmChg -fname -fvalue LongParam \ <<'!!!' Yes|cm.ha.enableIpsecWhack|1 !!!
Procedure
Note:
You must not enableIPsec on a live connection. Disable the connection before enabling IPsec.- Open platcfg.
- Add and configure an IPsec connection. For more information, see the Adding an IPsec Connection section.
- Select an IKE version.
- Complete the IKE configuration for the IPsec connection.
- Complete the ESP configuration for the IPsec connection.
- Complete the IPsec connection configuration entries.
- Wait for the connection to be added.
- Enable the IPsec connection. For more information, see the Enabling or Disabling Host Intrusion Detection System section.
- Logout of platcfg.
- Restart IPsec service by typing this
command:
# service ipsec restart
9.4 IPsec IKE and ESP Elements
Table 9-1 IPsec IKE and ESP Elements
Description | Valid Values | Default |
---|---|---|
Internet Key Exchange (IKE) Version | ikev1, ikev2 | ikev2 |
IKE Configuration | ||
IKE Encryption | aes128_cbc, aes192_cbc, aes256_cbc, 3des_cbc, hmac_md5 |
aes128_cbc hmac_md5 |
IKE Authentication | hmac_sha1, aes_xcbc, hmac_md5 | hmac_md5 |
Pseudo Random Function
This is used for the key exchange only for ikev2. |
hmac_sha1, aes_xcbc (ikev2) | |
Diffie-Hellman Group
The group number is used to generate the group (group - set of numbers with special algebraic properties) that is used to select keys for the Diffie-Hellman algorithm. The larger the group number, the larger the keys used in the algorithm. |
2, 14 (ikev2) 2 (ikev1) |
2 (IKEv1) 14 (IKEv2) |
IKE SA Lifetime
Lifetime of the IKE/IPsec security
associations. A correct lifetime value would be
<hours/mins/secs>. Example: 3 mins.
Note: If a connection goes down, it does not re-establish until the lifetime expires. If the lifetime is set to 60 minutes and a failure causing a switchover of a VIP is required, the switchover does not occur until the 60 minutes expire. The recommendation is to set the lifetime to the lowest possible time that does not impact network connectivity, such as 3-5 minutes. |
Number of time units | 60 |
Lifetime Units | hours, mins, secs | mins |
Perfect Forward Secrecy
This is an algorithm used to ensure that if one of the private keys is compromised the other keys are not compromised. |
yes, no | yes |
ESP Configuration | ||
ESP Authentication
Algorithm used to authenticate the encrypted ESP. |
hmac_sha1, hmac_md5 | hmac_sha1 |
Encryption Algorithm
Algorithm used to encrypt the actual IPsec packets. |
aes128_cbc, aes192_cbc, aes256_cbc, 3des_cbc | aes128_cbc |