Sending An Advance Email Alert For Impending SSL Certificate Expiration
Sending An Advance Email Alert For Impending SSL Certificate Expiration
You should consider using this procedure under the following condition:
You want to trigger an automatic notification email when an SSL certificate is within 30 days of expiration
or has already expired.
You can configure a BIG-IP system to monitor SSL certificate expiration status and send an email when
expiration is within 30 days. The check-cert utility performs this check weekly, which examines the expiration
date of each locally created or imported SSL certificate.
For more information about check-cert, refer to K14318: Monitoring SSL certificate expiration on the BIG-IP
system (11.x - 13.x).
For more information about when the utility runs, refer to K70264550: The BIG-IP system uses anacron to
manage scheduled jobs for daily, weekly, and monthly tasks.
The following procedure configures the BIG-IP system to resolve hosts from a DNS server.
Impact of procedure: Performing the following procedure should not have a negative impact on your system.
Note: If you want to use a fixed IP address instead of a resolved host name for your SMTP server, you may
skip this procedure.
2. To configure the BIG-IP system to use a DNS name server, use the following command syntax:
modify sys dns name-servers add { <ip_address1> <ip_address2>}
For example, to configure the BIG-IP system to use DNS name server 192.168.10.100, use the following
command:
The following procedure configures the BIG-IP system mail client to connect to an external SMTP server.
Note: Due to a known issue, the BIG-IP system does not automatically configure a domain name in the email
From: line. For more information about and how to work around the issue, refer to K15188934: Emails
generated by the BIG-IP system may fail after upgrading to 13.0.0.
Impact of procedure: Performing the following procedure should not have a negative impact on your system.
2. To configure the mail client to connect to an external SMTP server, use the following command syntax:
modify sys outbound-smtp mailhub <mail_server>:<port>
For example, to configure the system to send email messages to host mail.mydomain.com using port
587, you would type the following command:
The following procedure configures the BIG-IP system mail client to connect to an external SMTP server.
Impact of procedure: Performing the following procedure should not have a negative impact on your system.
For example:
mailhub=smtp.mydomain.com
For example:
mailhub=192.168.1.1
If the message is sent successfully, the user '[email protected]' should receive a test email
message.
Note: If you want the ssmtp.conf configuration change to persist beyond a BIG-IP upgrade, refer to
K4422: Viewing and modifying the files that are configured for inclusion in a UCS archive.
The following procedure configures the custom alerts necessary to trigger a custom SNMP trap and an email
alert for certificates which will expire within 30 days, and certificates which have already expired.
Impact of procedure: Performing the following procedure should not have a negative impact on your system.
Note: The following alert definitions rely on certificate expiration messages logged to the /var/log/ltm
file. If syslog-ng is not running, or the certificate expiration messages are not logged to the /var/log/ltm
file, an SMTP email message will not be generated and delivered.
alert BIGIP_TMSH_TMSH_CERT_EXPIRED {
email toaddress="[email protected]"
body="Certificate Expired on <BIG-IP>"
}
alert BIGIP_TMSH_TMSH_CERT_WILL_EXPIRE {
email toaddress="[email protected]"
body="Certificate will Expire on <BIG-IP>"
}
Impact of procedure: Performing the following procedure should not have a negative impact on your system.
2. To create a test certificate which expires in 10 days, type the following command:
create sys crypto key SOL15288testcert gen-certificate lifetime 10 common-name
SOL15288testcert.com
4. An email message should be sent to the user specified in the /config/user_alert.conf file and a
message similar to the following appears in the /var/log/ltm file:
01420008:4: Certificate 'CN=SOL15288testcert.com,C=US' in file /Common
/SOL15288testcert.crt will expire on <date>
5. When tests are confirmed, you may delete your 10-day test certificate and key by typing the following
commands from within tmsh:
delete /sys crypto key SOL15288testcert
delete /sys crypto cert SOL15288testcert
K13180: Configuring the BIG-IP system to deliver locally-generated email messages (11.x - 13.x)
K3727: Configuring custom SNMP traps
K3667: Configuring alerts to send email notifications
Applies to:
Product: BIG-IP, BIG-IP AAM, BIG-IP AFM, BIG-IP Analytics, BIG-IP APM, BIG-IP ASM, BIG-IP DNS, BIG-IP
GTM, BIG-IP Link Controller, BIG-IP LTM, BIG-IP PEM
15.X.X, 14.X.X, 13.X.X, 12.X.X, 11.X.X
Product: Legacy Products, Enterprise Manager, BIG-IP WebAccelerator, BIG-IP WOM, BIG-IP PSM, BIG-IP
Edge Gateway
15.X.X, 14.X.X, 13.X.X, 12.X.X, 11.X.X, 3.X.X