Note: Make sure your Sophos Firewall time is correct to avoid potential Certificate Trust issues
Overview
Table of Contents
Prerequisites
-
Cloudflare Account with Custom Domain
-
On-premise Web Servers
-
Sophos Firewall (Home/Enterprise)
-
Static IP or DDNS Subscription
-
Existing WAF policies for your web servers
Sophos CSR
Generate a CSR from Sophos using the below template: (System > Certificates > Add > Generate certificate signing request (CSR))
You can leave most of the fields blank and only fill out the name, country name, common name and SANs. Please substitute acmecorp.com for your own custom domain.
-
-
Name: cloudflare-acmecorp.com
-
Key type: Default
-
Key Length: Default
-
Secure hash: Default
-
Country name: Country
-
State: State
-
Locality name: City
-
Organization name: Acme Corp
-
Organization unit name: Business Unit
-
Common name: acmecorp.com
-
Email address: name@acmecorp.com
-
Subject Alternative Names (SANs)
-
DNS Names:
-
*.acmecorp.com
-
acmecorp.com
-
-
IP Address:
-
Blank/Default
-
-
-
Save
-
Head over to your certificates and click the arrow to download/copy from the newly generated CSR
Copy the CSR to clipboard and navigate to cloudflare
Cloudflare
Go to your cloudflare account, select your domain and navigate to SSL/TLS
Enable Full encryption mode and then navigate to Origin Server
Create Certificate, select "Use my private key and CSR" and paste in the CSR that you copied from the Sophos firewall.
Save the certificate and click on download. Copy the PEM formatted certificate contents, paste it into notepad save the file as "cloudflare-acmecorp.pem" and select Save as type "All files"
Once saved, go to your Sophos certificates menu and import the PEM file to the CSR. There will be no password associated to the PEM, just save it.
In Cloudflare DNS, change your website/application DNS record to "Proxied" and not "DNS only"
Sophos WAF
Create or Edit your WAF Policy according to Sophos documentation and use the cloudflare-acmecorp.com certificate that you created.
Manually insert your FQDN for your Application/Web Server app.acmecorp.com in the Domains field and save.
Ignore the error of "Following domain(s) will not be covered by selected HTTPS certificate.."
Testing
You can now test your website/application and confirm that the certificate information is from Cloudflare
______________________________________________________________________________________________________________________________________
Added TAG
[edited by: Erick Jan at 5:51 AM (GMT -7) on 28 Oct 2024]