0214.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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="How To,Tutorial,i12bretro,OpenVPN,OpenVPN Access Server,Access Server,PKI,Private Key Infrastructure,Certificates,CA,Certificate Authority">
  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. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Replace OpenVPN Access Server VPN Server and CA Certificates</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <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>
  25. <h2>Create OpenVPN Server&nbsp;Certificate</h2>
  26. <ol>
  27. <li>Launch XCA</li>
  28. <li>Open the PKI database if it is not already (File &gt; Open DataBase), enter password</li>
  29. <li>Click on the Certificates tab, right click on your Intermediate CA certificate</li>
  30. <li>Select New</li>
  31. <li>On the Source tab, make sure Use this Certificate for signing is selected</li>
  32. <li>Verify your Intermediate CA certificate is selected from the drop down</li>
  33. <li>Click the Subject tab</li>
  34. <li>Complete the Distinguished Name section
  35. <p>internalName: OpenVPN CA<br />
  36. countryName: US<br />
  37. stateOrProvinceName: Virginia<br />
  38. localityName: Northern<br />
  39. organizationName: i12bretro<br />
  40. organizationUnitName: i12bretro Certificate Authority<br />
  41. commonName: OpenVPN CA</p>
  42. </li>
  43. <li>Click the Generate a New Key button</li>
  44. <li>Enter a name and set the key size to at least 2048</li>
  45. <li>Click Create</li>
  46. <li>Click on the Extensions tab</li>
  47. <li>Select Certificate Authority from the type list</li>
  48. <li>Update the validity dates to fit your needs</li>
  49. <li>Click the Key Usage tab</li>
  50. <li>Under Key Usage select Digital Signature, Key Agreement and Certificate Sign</li>
  51. <li>Click OK to create the certificate</li>
  52. <li>Click on the Certificates tab, right click on your Intermediate CA certificate again</li>
  53. <li>Select New</li>
  54. <li>On the Source tab, make sure Use this Certificate for signing is selected</li>
  55. <li>Verify your Intermediate CA certificate is selected from the drop down</li>
  56. <li>Click the Subject tab</li>
  57. <li>Complete the Distinguished Name section
  58. <p>internalName: OpenVPN Server<br />
  59. countryName: US<br />
  60. stateOrProvinceName: Virginia<br />
  61. localityName: Northern<br />
  62. organizationName: i12bretro<br />
  63. organizationUnitName: i12bretro Certificate Authority<br />
  64. commonName: vpn.i12bretro.local</p>
  65. </li>
  66. <li>Click the Generate a New Key button</li>
  67. <li>Enter a name and set the key size to at least 2048</li>
  68. <li>Click Create</li>
  69. <li>Click on the Extensions tab</li>
  70. <li>Set the Type dropdown to End Endity</li>
  71. <li>Check the box next to Subject Key Identifier</li>
  72. <li>Update the validity dates to fit your needs</li>
  73. <li>Click the Key Usage tab</li>
  74. <li>Under Key Usage select Digital Signature and Key Encipherment</li>
  75. <li>Under Extended Key Usage select TLS Web Server Authentication</li>
  76. <li>Click the Netscape tab</li>
  77. <li>Deselect all options and clear the Netscape Comment field</li>
  78. <li>Click OK to create the certificate</li>
  79. </ol>
  80. <h2>Updating OpenVPN Access Server With New Certificates</h2>
  81. <ol>
  82. <li>Open a web browser and navigate to phpMyAdmin</li>
  83. <li>Expand as &gt; as_certs &gt; certificates</li>
  84. <li>Check the boxes next to OpenVPN CA and OpenVPN Server &gt; Select edit below the table</li>
  85. <li>In XCA, click on the Certificates tab &gt; right click on the OpenVPN CA &gt; Export &gt; Clipboard</li>
  86. <li>Back in phpMyAdmin, clear the cert field for the OpenVPN CA and paste the contents of the clipboard</li>
  87. <li>In XCA, click on the Private Keys tab &gt; right click on the OpenVPN CA &gt; Export &gt; Clipboard</li>
  88. <li>Make sure the format dropdown is set to PKCS #8 &gt; Click OK</li>
  89. <li>Back in phpMyAdmin, clear the priv_key field for the OpenVPN CA and paste the contents of the clipboard</li>
  90. <li>In XCA, click on the Certificates tab &gt; right click on the OpenVPN Server &gt; Export &gt; Clipboard</li>
  91. <li>Back in phpMyAdmin, clear the cert field for the OpenVPN Server and paste the contents of the clipboard</li>
  92. <li>In XCA, click on the Private Keys tab &gt; right click on the OpenVPN Server &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 Server and paste the contents of the clipboard</li>
  95. <li>Log into the OpenVPN Access Server admin interface https://DNSorIP:943/admin</li>
  96. <li>Click the Stop VPN services button</li>
  97. <li>Click the Confirm Stop button</li>
  98. <li>Click the Start VPN services button</li>
  99. </ol>
  100. </div>
  101. </div>
  102. </body>
  103. </html>