Taming the Sophos Firewall: CSR, SANs, and Chain of Trust
How to get a certificate from a private intermediate CA onto a Sophos Firewall: generate the CSR on the device, keep the SANs when signing with OpenSSL, build the chain, and assign it to the admin console.
I’ve got my Root CA and my Intermediate CA. Now, how to get a custom certificate onto a Sophos Firewall (or any appliance that generates its own CSR)?
Sophos is actually quite secure in this regard: it generates the private key internally and never lets it leave the device. This is great for security, but it means you can’t just generate a key pair on your laptop and upload it.
Realization
Here’s the workflow.
Step 1: Generate the CSR on the Sophos
In the Sophos admin console, navigate to Certificates and click Add. Choose Generate certificate signing request (CSR).
Fill in the details. The Common Name (CN) should be the primary FQDN (e.g., sophos.manzana.home).
Crucial part: The Subject Alternative Names (SANs). Browsers ignore the CN nowadays. You must list every single FQDN and IP address you’ll ever use to access the firewall:
sophos.manzana.homesophos.mgmt.manzana.homesophos.is.manzana.homesophos.cs.manzana.home172.16.16.1610.0.10.25410.0.0.254
Once generated, download the .csr file.
Step 2: Sign the CSR (and copy the extensions!)
Upload the CSR to the Intermediate CA (ct-intermediate-ca). Now, sign it.
Trap 1: The SANs. If you use
openssl x509 -reqwith your own-extfile, OpenSSL will ignore the SANs that Sophos put into the CSR. If you want to keep the CSR’s SANs, you must use-copy_extensions copy.
Trap 2: The CRL. However, Sophos does not put the CRL Distribution Point into the CSR. If you rely solely on
-copy_extensions copy, your final certificate will be missing the CRL URL.
The Fix: Keep your signing configuration (
sophos_ext.cnf) as the single source of truth. Put both the SANs and the CRL URL in there, and sign it without-copy_extensions copy:
Content of sophos_ext.cnf:
basicConstraints = CA:FALSE
keyUsage = critical, digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
crlDistributionPoints = URI:http://crl.cs.manzana.home/ca.crl
[ alt_names ]
DNS.1 = sophos.manzana.home
DNS.2 = sophos.mgmt.manzana.home
DNS.3 = sophos.is.manzana.home
DNS.4 = sophos.cs.manzana.home
IP.1 = 172.16.16.16
IP.2 = 10.0.0.254
IP.3 = 10.0.10.254
openssl x509 -req \
-in /pki/ca/intermediate/csr/Sophos_XG_PKI_2026.csr \
-CA /pki/ca/intermediate/certs/intermediate-ca.crt \
-CAkey /pki/ca/intermediate/private/intermediate-ca-key.pem \
-CAcreateserial \
-out /pki/ca/intermediate/certs/Sophos_XG_PKI_2026.crt \
-days 365 -sha256 \
-extfile /pki/ca/intermediate/sophos_ext.cnf
Always verify that both extensions (SAN & CRL) made it into the final certificate before proceeding:
openssl x509 -in Sophos_XG_PKI_2026.crt -noout -text | grep -A 3 "Subject Alternative Name"
openssl x509 -in Sophos_XG_PKI_2026.crt -noout -text | grep -A 2 "CRL Distribution Points"
Step 3: Build the Chain and Import
The Sophos needs the Intermediate CA certificate as well. You can either upload them separately or concatenate them:
cat Sophos_XG_PKI_2026.crt intermediate-ca.crt > Sophos_Chain.pem
In the Sophos interface, click the Import arrow next to the CSR entry. Select PKCS7 (.p7b) or PEM (.pem), upload the chain file, and choose “Certificate and certificate authority” - or paste the content of the Sophos_XG_PKI_2026.crt files, that’s faster.
Step 4: Assign the Certificate
Go to Administration > Admin and user settings. Under the Certificate dropdown, select the newly imported certificate. Click Apply.
The Final Test
Open the browser and navigate to https://sophos.manzana.home:4444.
If you see a red padlock (or a “Not Secure” warning), don’t panic. This is almost always a client-side trust issue. The Windows machine or browser doesn’t know about manzana Root CA yet.
Import the Root CA certificate into the Windows “Trusted Root Certification Authorities” store, clear the browser cache, and try again.
📋 NOTE: You have to upload “Root CA” and “Intermediate CA” certificates into Sophos (System > Certificates > Certificate authorities).
And that’s it. We’ve built a full-fledged PKI with a dedicated CRL server, an Intermediate CA, and a properly signed appliance TLS certificate. Our home lab is now more secure than some corporate networks I’ve seen. 😂