Create and Apply SSL Certificates to pfSense Web UI 🌱

Prerequisites

Create Your SSL Certificate

  1. Launch XCA
  2. Open the PKI database if it is not already (File > Open DataBase), enter password
  3. Click on the Certificates tab, right click on your Intermediate CA certificate
  4. Select New
  5. On the Source tab, make sure Use this Certificate for signing is selected
  6. Verify your Intermediate CA certificate is selected from the drop down
  7. Click the Subject tab
  8. Complete the Distinguished Name section

    internalName: fw.i12bretro.local
    countryName: US
    stateOrProvinceName: Virginia
    localityName: Northern
    organizationName: i12bretro
    organizationUnitName: i12bretro Certificate Authority
    commonName: fw.i12bretro.local

  9. Click the Generate a New Key button
  10. Enter a name and set the key size to at least 2048
  11. Click Create
  12. Click on the Extensions tab
  13. Select End Entity from the type list
  14. Click Edit next to Subject Alternative Name
  15. Add any DNS or IP addresses that the certificate will identify
  16. Update the validity dates to fit your needs
  17. Click the Key Usage tab
  18. Under Key Usage select Digital Signature, Key Encipherment
  19. Under Extended Key Usage select Web Server and Web Client Authentication
  20. Click the Netscape tab
  21. Select SSL Server
  22. Click OK to create the certificate

Exporting Required Files

  1. In XCA, click on the Certificates tab
  2. Right click the SSL certificate > Export > File
  3. Set the file name with a .crt extension and verify the export format is PEM (*.crt)
  4. Click OK
  5. Click the Private Keys tab
  6. Right click the private key generated for the SSL certificate > Export > File
  7. Set the file name with a .pk8 extension and verify the export format is PKCS #8 (*.pk8)
  8. Click OK

Applying the Certificates

  1. Log into the pfSense web UI
  2. Click System > Cert. Manager in the top navigation
  3. Click Certificates in the top sub-navigation menu
  4. Click the Add/Sign button at the lower right
  5. Set the Method to Import an existing Certificate
  6. Set the Name to Web UI SSL
  7. Open the .crt file exported earlier in Notepad, copy the contents to the Certificate data field
  8. Open the .pk8 file exported earlier in Notepad, copy the contents to the Private key data field
  9. Scroll down to the bottom of the page and click Save
  10. Click System > Advanced from the top navigation
  11. Select HTTPS for the Protocol
  12. Select Web UI SSL from the SSL/TLS Certificate dropdown
  13. Scroll down to the bottom of the page and click Save
  14. Wait a few seconds for the Web UI to restart
  15. Update the address in the browser to https:// to test the change