Monitor OpenVPN Certificate expiration dates



  • Hi All,

    I'm trying to find info on how to in CLI to check the expiration date of the OpenVPN certificates so that i can do a simple plugin for nagios to alert me when there is only 1 week left on the cert.

    or do i need to use the UI to fetch this info?


  • Rebel Alliance Developer Netgate

    The user certificates are not stored on the filesystem in an easily readable format. They are kept in the config.xml but they are base64 encoded there.

    If the CA and server certificates are in use by OpenVPN or IPsec they can be found in /var/etc/openvpn/ or /var/etc/ipsec/ with the name varying depending on the exact instance and its usage.

    Otherwise you'll need something to loop through the certs in the config, decode them, and check the dates. Not terribly difficult but not something we have a command-line script for at the moment



  • sweet, thx!! made my day :)


Log in to reply