Guest User!

You are not Sophos Staff.

[LetsEncrypt] How To in Sophos Firewall

Disclaimer: This information is provided as-is for the benefit of the Community. Please contact Sophos Professional Services if you require assistance with your specific environment.

Hi Guys,

This Recommended Read goes over different options to obtain a Let's Encrypt certificate.

Overview

UTM has a LE Support for WAF (since UTM9.6). But on Sophos you can use LE certificates as well! Seems like many people does not know, you simply need a little Linux server and 5-10 minutes of your time each 3 month. Or you automate this. 

First of all, i want to share the "how it works" page of LE. https://letsencrypt.org/how-it-works/

My Setup. 

Internet - Sophos - Ubuntu 20.04 LTS
Ubuntu has "certbot" installed. Feel free to use other LE modules.
https://certbot.eff.org/ https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
Follow straight the Guide for your OS. I am relying fully on those apps for the renewal process.  

Next step is, I am choosing the HTTP-01 method for LE, so i need a DNAT for LE to my Ubuntu.

 (V18). 

PS: I am using HTTP DNAT for the renewal process and deactivate those Rules after the process. But you can also use only the LE IPs: 
https://community.letsencrypt.org/t/can-i-get-list-ip-from-letsencrypt/57117
PS2: You could switch to the DNS validation like explained in this Community thread.  

Next steps would be to check your Domain. Your DNS A-Record should point to your WAN IP. Otherwise this process will not work. 
So perform a dig / nslookup of your domain. It should point to your WAN IP, so your DNAT will work and HTTP packets are forwarded to Certbot. 
You can also use the Sophos free DDNS service. https://community.sophos.com/kb/en-us/123126 

Certbot

Lets start certbot and try it. 
My renewal process is straight forward:


(Be careful: LE blocks you after couple of "failed" request for some time. So check everything!).
In the End you will get 4 files on your Linux: Public, Chain, Fullchain, Privatkey Certificates. 

Upload to Sophos Firewall

You will use this Public and Privatkey certificate. 
There are couple of approaches to upload this to Sophos . 

The first LE Cert can be simply uploaded. 
You should use the Public.pem in "Certificate" and the Privatkey in "Privat key". 
PS: you have to rename the Privatkey.pem to Privatkey.key, otherwise Sophos will not take this certificate. 

 

Optionally you can upload the other Chain and fullchain Certificate under Certificate Authorities (Without Privat key). 
Now you can use this Certificate for WAF/Webadmin. 

In case of renewal (each 90 Days), you have to choose a process.

Automation 


You can simply upload the new LE certificate with another Name and replace it in WAF/Webadmin. 
Or you can "update" the current LE certificate with new public.pem / privat.key. But for this method, you have to switch to a fallback certificate in WAF/Webadmin, because Sophos cannot update a certificate, which is currently in use.  

After all, those steps are manual process each 90 Days. 
You can "script" this, if you want to. So basically upload the certificate each 90 Days to Sophos . 
https://community.sophos.com/kb/en-us/132560
Other member in the community performed already scripts for this.
https://community.sophos.com/products/Sophos -firewall/f/sophos-Sophos -firewall-general-discussion/102208/upload-certificate-using-api
https://community.sophos.com/Sophos -firewall/f/discussions/126295/automatically-renew-let-s-encrypt-ssl-certificates-on-Sophos -using-powershell
https://github.com/mmccarn/sophos
https://community.sophos.com/sophos-Sophos -firewall/f/discussions/129768/letsencrypt-api-update-script---dynamically-handles-multiple-certs-multiple-rules-including-re-grouping-of-policies-rules
https://community.sophos.com/sophos-Sophos -firewall/f/discussions/134534/sophos-Sophos -api-lets-encrypt-powershell-7-waf-update
https://community.sophos.com/sophos-Sophos -firewall/f/discussions/138668/upload-certificates-using-powershell-to-automate-let-s-encrypt

If you want to script this, this community can help you in case you are struggling with a point! 
So simply open a new thread with your issue with the API, we will try to find a solution. 

Sophos Factory

Sophos Factory brings a new Tool to automate Script based approaches. This means, you can easily run a Script like Certbot or Lego in a Sophos Factory environment to generate the certificate and upload it to the Sophos Firewall. 

Sophos Factory offers a free Community Edition. https://community.sophos.com/sophos-factory/ https://community.sophos.com/sophos-factory/b/release-notes-news/posts/get-started-here-sophos-factory-offer-automation-for-all-with-its-free-community-edition

Within Sophos Factory it could look like this:

Each step is one scripting component. By Using tools like Lego and Github, the "Pipeline" will run one time, generate the certificate and upload it to the Firewall. 

Contribution:


 
 https://zerossl.com/free-ssl/#crt Free alternative to this approach
For the Github script. 
 Thanks for the PHP Script! 
 for a Powershell Script with WAF integration. 
 for another version of a Powershell Script. 



Updated Disclaimer
[edited by: Erick Jan at 9:16 AM (GMT -7) on 17 Apr 2023]
Parents
  • Added Sophos Factory to this Thread. 

    __________________________________________________________________________________________________________________

  • This Feature was one of the top ranked Requests in Ideas (rip).

    On every corner in the Forums people ask for it.

    The feature was promised the same time it was for UTM. UTM has it for years now - and XG it is still "on the Roadmap" with no sign of anybody even touching it.

    Just another Feature, the "next gen" does not have - and likely will not get any time soon. 

    Sophos' communication on development and feature implementation in xg is getting to a point where it is embarrassing at best - fraudulent at worst.

  • I do not understand, why the firewall should be part of the work of being a certificate store. But i am from the old school of having a separate service for such tasks. And i am a fan of automate such task for multiple instances at once. 

    Again: I am not a Product Manager nor do i have influence on the roadmap or any other topics. I am here to help and give advice. 

    If you want to prioritize this, feel free to reach out to your local Sales rep to get sorted out. 

    I cannot comment on this any further. 

    __________________________________________________________________________________________________________________

  • SFOS has a WAF, that's why. UTM supports it. Put your products on feature parity. It's simple. Cleary if UTM has it, someone at Sophos thought it was an important feature and can see the need for a firewall to handle the certificates of the websites that use it's WAF.

  • So you will need Webserver Protection Licenses for LE? That would be requirement to get this to work. And most customers, i am talking to, are not licensing WAF anymore. (Only if Exchange on Prem is present). 

    Again: If you have a business case and a customer needing this feature, you can contact Sales to get the prioritization right. I am not seeing much LE requests from customer lately. 

    I am more in implementation of ZTNA lately, and ZTNA need a wildcard certificate, which means, it needs DNS LE Challenge as well. 

    __________________________________________________________________________________________________________________

  • I don't know if our provider would support that (SCHLUNDTECH), but that's not the point.

    On the UTM it works since version 9.6 from 2018-11-22 with the http method. In XG/SFOS timeline that would be 17.5MR 9 or so.
    We have seen 18, 18.5 and 19 until then and still the community feels a bit "ignored" when a so often requested feature is somewhere down in development.

    I don't see the fact you state about the "much more secure" DNS way. UTM users can choose to use the "unsecure" HTTP method for almost 2 years now. UTM users can choose if or not, XG users have no choice and can somehow be frustrated.

    Don't get me wrong. In our deployments there is mainly one certificate in use for the user portal and web admin. If the customer has a more complex WAF he is using a wildcard certificate. No deal.
    But if I imagine some of our customers with their 10+ domains that all have some kinds of subdomains and different portals, they won't be using 10+ wildcard certificates, because of a firewall that is not able to do LE-integration. They would change their vendor because they could nearly buy a new firewall for the wildcard certificate costs.

    Sophos should make clear if they want to target customers from small to enterprise size or maybe BIG enterprises only where "additional costs" for a firewall (like certificates, renewal processes) don't count.

    Regards,

    Kevin

    Sophos CE/CA (XG, UTM, Central Endpoint)
    Gold Partner

  • As i know, you are in the German/DACH Market: Could you give me (via DM) a list of those customers facing this challenges of multiple domains? Because i am not seeing nor talking to them. 

    If this is the reason, they change there vendors, this need to be clearly addressed to Sophos. I am not seeing any customer coming to us and telling us/me: "I cannot migrate to SFOS or cannot use SFOS because of lack of LE." 

    If you have such customers, feel free to reach out to me to discuss this further. 

    __________________________________________________________________________________________________________________

  • I don't have a list of customers, I only wanted to give you some arguments, how small businesses - at least here in germany - are thinking.

    We as a Sophos Partner are already having issues selling them a newer firewall or renewals (because of the bill they have to pay), they don't spend money into IT security like big enterprises do. We are glad about any customer we can move to Sophos from another firewall vendor. But at the latest with the next renewal we get a "can we make something about the pricing?" as the first response. Having them to migrate to a new system that maybe has more - but on the other side LESS features than the previous firewall we have to explain them why they need an additional 15€/year ssl certificate for webadmin/userportal, no joke!

    I just wanted to remind, that not all Sophos customers are the same and in my opinion Sophos is putting the focus only on big enterprises - at least since the takeover/invest of Thoma Bravo.

    Regards,

    Kevin

    Sophos CE/CA (XG, UTM, Central Endpoint)
    Gold Partner

  • This is clear but i want to state out, if you tackle some customer like that, please inform Sophos in this process of migration and discussions. If nobody is reaching out to Sales about the issues you have, it cannot be addressed. 

    __________________________________________________________________________________________________________________

  • Sophos should be aware of it, User Voice and all the comments with every release. If they are not aware they dont care about there customers.

  • NOT using those API

    Mainly those

    We don't try to migrate existing DNS records for new customer to our vendor. We rather use, whats there - and most of that doesn't come with an API.

    Further I support, what said - but at least from my mind, I never had the customers really complaining about costs for certificates. Maybe, because we never really forced Let's Encrypt on any system and always sticked with paid certs for exchange and other services.

    Therefore, I would still support . As more and more services become Cloud-hosted, this discussion becomes more irrelevant to me. Those customers who still wants on prem exchange servers already have to pay for services, management, ongoing updates, etc. 15€/year for a certificate is the smallest cost point on running exchange locally. Those who want to safe cost will go to Microsoft 365 (or any other cloud service). Those we still want to have an exchange locally (mostly) know, that they need certificates - and in the context of a new exchange server project this costs are there, but I never spoke about the price for them (maybe why and if the customer really needs those - but answering this is part of the consulting i.m.o.).

    The lack of LE - speaking of me personally - mainly happens, when there is a non exchange service and no wildcards are bought and I would like to reroute everything through SFOS to get HTTPS. This happens, but it is a really edge case - and I don't know any other person in my team that would do this at all.

    I see, that both WAF and E-Mail Protection won't be part of core SFOS anymore. This trend has already started as the new total protect doesn't come with both AddOns. For me this is fine - even if its cool to administrating both. But with this trend - If I don't have any service where I could use the certificate on the majority of appliances, I totally understand, why the main focus of 18.0 to 19.0 were  features inside Network and Web Protection (SD-WAN, NAT, SSL/TLS inspection). Also - those are features, that I use even at SMB customers.

    TL;DR;: Yes - I still want LE on XGS. Yes - I still want LE be integrated in SFOS and I don't want another third party in that process. And yes - I will cheer, when LE makes its way to SFOS.
    But the impact that LE would have today (or in the future) is way smaller, then it had on SG back with  and I would even say, that I wouldn't swap a feature I got today for having LE.

Reply
  • NOT using those API

    Mainly those

    We don't try to migrate existing DNS records for new customer to our vendor. We rather use, whats there - and most of that doesn't come with an API.

    Further I support, what said - but at least from my mind, I never had the customers really complaining about costs for certificates. Maybe, because we never really forced Let's Encrypt on any system and always sticked with paid certs for exchange and other services.

    Therefore, I would still support . As more and more services become Cloud-hosted, this discussion becomes more irrelevant to me. Those customers who still wants on prem exchange servers already have to pay for services, management, ongoing updates, etc. 15€/year for a certificate is the smallest cost point on running exchange locally. Those who want to safe cost will go to Microsoft 365 (or any other cloud service). Those we still want to have an exchange locally (mostly) know, that they need certificates - and in the context of a new exchange server project this costs are there, but I never spoke about the price for them (maybe why and if the customer really needs those - but answering this is part of the consulting i.m.o.).

    The lack of LE - speaking of me personally - mainly happens, when there is a non exchange service and no wildcards are bought and I would like to reroute everything through SFOS to get HTTPS. This happens, but it is a really edge case - and I don't know any other person in my team that would do this at all.

    I see, that both WAF and E-Mail Protection won't be part of core SFOS anymore. This trend has already started as the new total protect doesn't come with both AddOns. For me this is fine - even if its cool to administrating both. But with this trend - If I don't have any service where I could use the certificate on the majority of appliances, I totally understand, why the main focus of 18.0 to 19.0 were  features inside Network and Web Protection (SD-WAN, NAT, SSL/TLS inspection). Also - those are features, that I use even at SMB customers.

    TL;DR;: Yes - I still want LE on XGS. Yes - I still want LE be integrated in SFOS and I don't want another third party in that process. And yes - I will cheer, when LE makes its way to SFOS.
    But the impact that LE would have today (or in the future) is way smaller, then it had on SG back with  and I would even say, that I wouldn't swap a feature I got today for having LE.

Children
No Data