Set-Up Lets Encrypt On pfSense
Setting up Let’s Encrypt on pfSense involves using the ACME package to automatically request and renew SSL certificates for your domains. This guide assumes you have a domain name pointing to your pfSense router’s public IP address. Here’s how to set up Let’s Encrypt on pfSense:
1. Install the ACME Package:
- Log in to the pfSense web interface.
- Go to “System” > “Package Manager.”
- Search for “ACME” and install the ACME package.
2. Configure ACME Package:
- After installation, go to “Services” > “ACME Certificates.”
- Click on the “Issue/Renew” tab.
- Click the “+” button to add a new certificate.
- Configure the certificate settings:
- Domain: Enter your domain name (e.g., example.com).
- Domain key: Choose “Create a new key.”
- Domain resolver: Choose “DNS-Cloudflare” or another method if needed.
- Account key: Choose “Create a new account key.”
- Certificate authority: Choose “Let’s Encrypt Production ACME v2.”
- Validation method: Choose “HTTP-01.”
- Under “Custom Options,” enter the following:
json
{
"webroot-path": "/usr/local/www/acme"
}
- Save the configuration.
3. Configure Firewall Rules:
- Go to “Firewall” > “NAT.”
- Add a new port forward rule to forward external port 80 to internal port 80 on the pfSense router.
4. Create a Firewall Rule for Let’s Encrypt Validation:
- Go to “Firewall” > “Rules.”
- Create a new rule for the WAN interface:
- Action Pass
- Interface: WAN
- Address Family: IPv4
- Protocol: TCP
- Source: Any
- Destination: This Firewall (self)
- Destination Port Range: HTTP (80)
- Save
5. Issue the Certificate:
- Go back to “Services” > “ACME Certificates.”
- Click the “Issue/Renew” tab.
- Click the “Renew” button for the certificate you configured.
6. Configure HTTPS Services:
- Go to “Services” > “Webserver.”
- Under “Webserver Settings,” check “Enable web server” and set the HTTPS port to 443.
7. Install the Certificate:
- Go to “System” > “Certificate Manager.”
- Click the “+” button to add a new certificate.
- Method: Import an existing certificate
- Certificate data: Paste the contents of the certificate (Full Chain)
- Private key data: Paste the contents of the private key
- Save the certificate.
8. Configure Services to Use the Certificate:
- Go to “Services” > “Webserver.”
- Under “Default certificate,” select the certificate you imported
- Save the configuration.
Your pfSense router should now have a Let’s Encrypt SSL certificate installed and configured for HTTPS services. Make sure to test the certificate by accessing your domain using HTTPS. Remember to monitor certificate renewals to ensure that your SSL certificate remains valid.