Prerequisites
- A XCA PKI database https://youtu.be/ezzj3x207lQ
Create Your SSL Certificate
- Launch XCA
- Open the PKI database if it is not already (File > Open DataBase), enter password
- Click on the Certificates tab, right click on your Intermediate CA certificate
- Select New
- On the Source tab, make sure Use this Certificate for signing is selected
- Verify your Intermediate CA certificate is selected from the drop down
- Click the Subject tab
- 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 - Click the Generate a New Key button
- Enter a name and set the key size to at least 2048
- Click Create
- Click on the Extensions tab
- Select End Entity from the type list
- Click Edit next to Subject Alternative Name
- Add any DNS or IP addresses that the certificate will identify
- Update the validity dates to fit your needs
- Click the Key Usage tab
- Under Key Usage select Digital Signature, Key Encipherment
- Under Extended Key Usage select Web Server and Web Client Authentication
- Click the Netscape tab
- Select SSL Server
- Click OK to create the certificate
Exporting Required Files
- In XCA, click on the Certificates tab
- Right click the SSL certificate > Export > File
- Set the file name with a .crt extension and verify the export format is PEM (*.crt)
- Click OK
- Click the Private Keys tab
- Right click the private key generated for the SSL certificate > Export > File
- Set the file name with a .pk8 extension and verify the export format is PKCS #8 (*.pk8)
- Click OK
Applying the Certificates
- Log into the OPNSense web UI
- Click System > Trust > Certificates in the left navigation
- Click the Add button at the top right
- Set the Method to Import an existing Certificate
- Set the Name to Web UI SSL
- Open the .crt file exported earlier in Notepad, copy the contents to the Certificate data field
- Open the .pk8 file exported earlier in Notepad, copy the contents to the Private key data field
- Scroll down to the bottom of the page and click Save
- Click System > Settings > Administration in the left navigation
- Select HTTPS for the Protocol
- Select Web UI SSL from the SSL Certificate dropdown
- Scroll down to the bottom of the page and click Save
- Wait a few seconds for the Web UI to restart and click the https:// link