0004.html 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Creating a Self-Signed Public Key Infrastructure (PKI)</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="PKI,Public Key Infrastructure,XCA,SSL,Web Server,OpenVPN,Certificates,Certificate Authority,Self-Signed,Tutorial">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Creating a Self-Signed Public Key Infrastructure (PKI)">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  12. <script type="text/javascript" src="includes/js/steps.js"></script>
  13. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  14. </head>
  15. <body>
  16. <div id="gridContainer">
  17. <div class="topMargin"></div>
  18. <div id="listName" class="topMargin">
  19. <h1>Creating a Self-Signed Public Key Infrastructure (PKI)</h1>
  20. </div>
  21. <div></div>
  22. <div id="content">
  23. <p>This is part one of a series of creating your own self-signed PKI and some ways to utilize the PKI to setup SSL for your web server or create your own OpenVPN server.</p>
  24. <p>Disclaimer: I am not a security expert. This is just the easiest way I have found to create and utilize SSL for my homelab services.</p>
  25. <h2>Getting Started</h2>
  26. <ol>
  27. <li>Download X Certificate Key Manager<a href="https://hohnstaedt.de/xca/index.php/download" target="_blank"> Download</a></li>
  28. <li>Extract X Certificate Key Manager</li>
  29. <li>Launch xca.exe</li>
  30. <li>Select File &gt; Create Database</li>
  31. <li>Name your PKI database and click save</li>
  32. <li>Enter a password for you database</li>
  33. <li>Re-type to confirm and click OK</li>
  34. </ol>
  35. <h2>Creating the Root Certificate Authority</h2>
  36. <ol>
  37. <li>Navigate to the Certificates tab</li>
  38. <li>Click the New Certificate button</li>
  39. <li>Click the Subject tab</li>
  40. <li>Complete the Distinguished Name section
  41. <p>internalName: i12bretro Root CA<br />
  42. countryName: US<br />
  43. stateOrProvinceName: Virginia<br />
  44. localityName: Northern<br />
  45. organizationName: i12bretro<br />
  46. organizationUnitName: i12bretro Certificate Authority<br />
  47. commonName: i12bretro Root CA</p>
  48. </li>
  49. <li>Click the Generate a New Key button</li>
  50. <li>Enter a name and set the key size to at least 2048</li>
  51. <li>Click Create</li>
  52. <li>Click on the Extensions tab</li>
  53. <li>Select Certificate Authority from the type list</li>
  54. <li>Update the validity dates to fit your needs</li>
  55. <li>Click the Key Usage tab</li>
  56. <li>Under Key Usage select Digital Signature, Key Agreement and Certificate Sign</li>
  57. <li>Click OK to create the certificate</li>
  58. </ol>
  59. <h2>Creating the Intermediate Certificate Authority</h2>
  60. <ol>
  61. <li>From the Certificates tab, right click on your Root CA certificate</li>
  62. <li>Select New</li>
  63. <li>On the Source tab, make sure Use this Certificate for signing is selected</li>
  64. <li>Verify your Root CA certificate is selected from the drop down</li>
  65. <li>Click the Subject tab</li>
  66. <li>Complete the Distinguished Name section
  67. <p>internalName: i12bretro Intermediate CA<br />
  68. countryName: US<br />
  69. stateOrProvinceName: Virginia<br />
  70. localityName: Northern<br />
  71. organizationName: i12bretro<br />
  72. organizationUnitName: i12bretro Certificate Authority<br />
  73. commonName: i12bretro Intermediate CA</p>
  74. </li>
  75. <li>Click the Generate a New Key button</li>
  76. <li>Enter a name and set the key size to at least 2048</li>
  77. <li>Click Create</li>
  78. <li>Click on the Extensions tab</li>
  79. <li>Select Certificate Authority from the type list</li>
  80. <li>Update the validity dates to fit your needs</li>
  81. <li>Click the Key Usage tab</li>
  82. <li>Under Key Usage select Digital Signature, Key Agreement and Certificate Sign</li>
  83. <li>Click OK to create the certificate</li>
  84. <li>From this point forward, use the intermediate certificate to create end entity certificates</li>
  85. </ol>
  86. </div>
  87. </div>
  88. </body>
  89. </html>