0214.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Replace OpenVPN Access Server VPN Server and CA Certificates</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="OpenVPN,OpenVPN Access Server,Access Server,PKI,Private Key Infrastructure,Certificates,CA,Certificate Authority,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Replace OpenVPN Access Server VPN Server and CA Certificates">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="10/24/2022 10:38:49 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Replace OpenVPN Access Server VPN Server and CA Certificates</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <p>NOTE: Following this procedure will invalidate any client certificates currently in use with the OpenVPN Access Server. These clients will need to re-download their certificates from the OpenVPN Access Server to get connected using the updated certificates</p>
  26. <h2>Prerequisites</h2>
  27. <ul>
  28. <li class="noCheckbox">A XCA PKI database <a href="https://youtu.be/ezzj3x207lQ" target="_blank">https://youtu.be/ezzj3x207lQ</a></li>
  29. </ul>
  30. <h2>Create OpenVPN Server Certificate</h2>
  31. <ol>
  32. <li>Launch XCA</li>
  33. <li>Open the PKI database if it is not already (File &gt; Open DataBase), enter password</li>
  34. <li>Click on the Certificates tab, right click on your Intermediate CA certificate</li>
  35. <li>Select New</li>
  36. <li>On the Source tab, make sure Use this Certificate for signing is selected</li>
  37. <li>Verify your Intermediate CA certificate is selected from the drop down</li>
  38. <li>Click the Subject tab</li>
  39. <li>Complete the Distinguished Name section
  40. <p>internalName: OpenVPN CA<br />
  41. countryName: US<br />
  42. stateOrProvinceName: Virginia<br />
  43. localityName: Northern<br />
  44. organizationName: i12bretro<br />
  45. organizationUnitName: i12bretro Certificate Authority<br />
  46. commonName: OpenVPN CA</p>
  47. </li>
  48. <li>Click the Generate a New Key button</li>
  49. <li>Enter a name and set the key size to at least 2048</li>
  50. <li>Click Create</li>
  51. <li>Click on the Extensions tab</li>
  52. <li>Select Certificate Authority from the type list</li>
  53. <li>Update the validity dates to fit your needs</li>
  54. <li>Click the Key Usage tab</li>
  55. <li>Under Key Usage select Digital Signature, Key Agreement and Certificate Sign</li>
  56. <li>Click OK to create the certificate</li>
  57. <li>Click on the Certificates tab, right click on your Intermediate CA certificate again</li>
  58. <li>Select New</li>
  59. <li>On the Source tab, make sure Use this Certificate for signing is selected</li>
  60. <li>Verify your Intermediate CA certificate is selected from the drop down</li>
  61. <li>Click the Subject tab</li>
  62. <li>Complete the Distinguished Name section
  63. <p>internalName: OpenVPN Server<br />
  64. countryName: US<br />
  65. stateOrProvinceName: Virginia<br />
  66. localityName: Northern<br />
  67. organizationName: i12bretro<br />
  68. organizationUnitName: i12bretro Certificate Authority<br />
  69. commonName: vpn.i12bretro.local</p>
  70. </li>
  71. <li>Click the Generate a New Key button</li>
  72. <li>Enter a name and set the key size to at least 2048</li>
  73. <li>Click Create</li>
  74. <li>Click on the Extensions tab</li>
  75. <li>Set the Type dropdown to End Endity</li>
  76. <li>Check the box next to Subject Key Identifier</li>
  77. <li>Update the validity dates to fit your needs</li>
  78. <li>Click the Key Usage tab</li>
  79. <li>Under Key Usage select Digital Signature and Key Encipherment</li>
  80. <li>Under Extended Key Usage select TLS Web Server Authentication</li>
  81. <li>Click the Netscape tab</li>
  82. <li>Deselect all options and clear the Netscape Comment field</li>
  83. <li>Click OK to create the certificate</li>
  84. </ol>
  85. <h2>Updating OpenVPN Access Server With New Certificates</h2>
  86. <ol>
  87. <li>Open a web browser and navigate to phpMyAdmin</li>
  88. <li>Expand as &gt; as_certs &gt; certificates</li>
  89. <li>Check the boxes next to OpenVPN CA and OpenVPN Server &gt; Select edit below the table</li>
  90. <li>In XCA, click on the Certificates tab &gt; right click on the OpenVPN CA &gt; Export &gt; Clipboard</li>
  91. <li>Back in phpMyAdmin, clear the cert field for the OpenVPN CA and paste the contents of the clipboard</li>
  92. <li>In XCA, click on the Private Keys tab &gt; right click on the OpenVPN CA &gt; Export &gt; Clipboard</li>
  93. <li>Make sure the format dropdown is set to PKCS #8 &gt; Click OK</li>
  94. <li>Back in phpMyAdmin, clear the priv_key field for the OpenVPN CA and paste the contents of the clipboard</li>
  95. <li>In XCA, click on the Certificates tab &gt; right click on the OpenVPN Server &gt; Export &gt; Clipboard</li>
  96. <li>Back in phpMyAdmin, clear the cert field for the OpenVPN Server and paste the contents of the clipboard</li>
  97. <li>In XCA, click on the Private Keys tab &gt; right click on the OpenVPN Server &gt; Export &gt; Clipboard</li>
  98. <li>Make sure the format dropdown is set to PKCS #8 &gt; Click OK</li>
  99. <li>Back in phpMyAdmin, clear the priv_key field for the OpenVPN Server and paste the contents of the clipboard</li>
  100. <li>Log into the OpenVPN Access Server admin interface https://DNSorIP:943/admin</li>
  101. <li>Click the Stop VPN services button</li>
  102. <li>Click the Confirm Stop button</li>
  103. <li>Click the Start VPN services button</li>
  104. </ol> </div>
  105. </div>
  106. </body>
  107. </html>