# Security

# pfSense - VLANs Setup

[https://nguvu.org/pfsense/pfsense-baseline-setup/](https://nguvu.org/pfsense/pfsense-baseline-setup/)

[https://www.youtube.com/watch?v=b2w1Ywt081o](https://www.youtube.com/watch?v=b2w1Ywt081o)

# Security - Windows LDAPS Cert

This is to setup a Windows ADCS

#### Windows Certificate

These command are to install ADCS, this will take a while to complete.

##### Step 1: Install Active Directory Certificate Services (AD CS)

```powershell
Add-WindowsFeature Adcs-Cert-Authority -IncludeManagementTools
```

##### Step 2: Assign EnterpriseRootCA Role

```powershell
Install-AdcsCertificationAuthority -CAType EnterpriseRootCA
```

Type "Y" for the installation question

This will update the server

```powershell
gpupdate /force
```

##### Step 3: Verify AD CS Role is Installed

Go to server manager and verify by refreshing the page and that the AD CS Role was installed

[![image.png](https://docs.sflservicesllc.com/uploads/images/gallery/2026-02/scaled-1680-/QJZimage.png)](https://docs.sflservicesllc.com/uploads/images/gallery/2026-02/QJZimage.png)

Step 4: Create Certificate Template

Run the following

```powershell
certsv.msc
```

# Security - Retrieve Windows Root CA Certificate for Import

This is to retrieve a Windows certificate that was configured [HERE](https://docs.sflservicesllc.com/books/all-others-stuff/page/security-windows-2025-ldaps-cert-and-export-kerberos-keytab "Windows Certificate Installation")

# Security - Export Kerberos KeyTab from Windows Root CA

#### KeyTab Export

To export the KeyTab from the Windows CA server, in this case it is for KeyCloak mentioned [HERE](https://docs.sflservicesllc.com/books/security/page/security-windows-ldaps-cert "KeyTab Export")

Run this in PowerShell

```powershell
cd \temp
ktpass -princ HTTP/server.domain.com@SERVER.DOMAIN.COM -mapuser user@DOMAIN.COM -pass '' -crypto AES256-SHA1 -ptype KRB5_NT_PRINCIPAL -out keycloak.keytab
dir
```

This will show you the newly create KeyTab

[![image.png](https://docs.sflservicesllc.com/uploads/images/gallery/2026-02/scaled-1680-/image.png)](https://docs.sflservicesllc.com/uploads/images/gallery/2026-02/image.png)

# pfSense - LDAP to Windows 2025 without CA

To be able to hook up pfsense to Windows 2025 default AD you need to add a Group Policy to override the defaults in windows 2025 server

<table border="1" id="bkmrk-domain-controller-po" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>Domain Controller Policy  
===Computer Configuration  
======Policies  
=========Windows Settings  
============Security Settings  
===============Local Policies  
==================Security Options  
=====================Domain controller: LDAP server channel binding token requirements: "When Supported"  
=====================Domain controller: LDAP server signing requirements: "None"  
=====================Domain controller: LDAP server Enforce signing requirements: "Disabled"  
=====================Network security: LDAP client encryption requirements: "Negotiate Sealing"  
=====================Network security: LDAP client signing requirements: "Negotiate Signing"</td></tr></tbody></table>

Taken from [here](https://forum.netgate.com/topic/187453/ldap-authentication-with-active-directory-windows-server-2025-bind-fails/3)

# Security - Create a Code Signing Template

Here’s a step-by-step guide to create a new **code signing certificate template** in Active Directory Certificate Services (**AD CS**) based on the built-in "Code Signing" template. This new template can be used by domain users (from your current domain or trusted domains in the same forest) to enroll for code signing certificates.

The phrase "for a different domain name" likely means you want certificates where the **subject name** (or Subject Alternative Name / UPN) reflects a different domain/organization/branding (e.g., "Code Signing Authority - othercompany.com" instead of the user's actual AD name like "<Steve@contoso.com>"). The standard "Code Signing" template builds the subject from Active Directory (user's CN + UPN), which ties it to the enrolling user's domain identity.

To allow a custom / different subject name (common for organizational code signing certs), set the template to **Supply in the request**. This lets the user provide their own subject during enrollment (via certreq.exe, MMC Certificates snap-in, or PowerShell).

**Important security note**: Setting "Supply in the request" without tight controls is risky (ESC vulnerabilities like ESC1/ESC2). Limit enrollment to a small, trusted group (e.g., developers or a code-signing admins group). Avoid enabling this broadly for all Domain Users unless necessary.

#### Step 1: Open the Certificate Templates Console

- Log in to a domain-joined machine with Enterprise Admin rights (or delegated rights to manage templates).
- Run certtmpl.msc (Certificate Templates MMC snap-in).

#### Step 2: Duplicate the Built-in Code Signing Template

- In the list, find the template named **Code Signing**.
- Right-click it → **Duplicate Template**.
- In the **Compatibility** tab (if shown): 
    - Certification Authority: Windows Server 2016 / 2019 / 2022 (or highest supported).
    - Certificate recipient: Same or highest.
- Click **OK** to open the new template properties.

#### Step 3: Configure General Tab

- **Template display name**: Something descriptive, e.g., Custom Code Signing - OtherDomain or Code Signing - branding.otherdomain.com.
- **Template name**: Auto-filled (spaces removed from display name).
- **Validity period**: 1–3 years (common for code signing; match your policy).
- **Renewal period**: e.g., 6 weeks.
- Check **Publish certificate in Active Directory** if you want the cert discoverable (usually **not** needed for code signing).

#### Step 4: Request Handling Tab

- **Purpose**: Signature and encryption (default is fine; code signing mainly needs signature).
- Check **Allow private key to be exported** (very common for code signing — developers often need to export to other machines or build servers).
- **Minimum key size**: 2048 (or 4096 for stronger security).
- Uncheck **Strong private key protection** unless required.

#### Step 5: Subject Name Tab (Key Change for "Different Domain Name")

- Select **Supply in the request** (this is the main change — it allows custom subject during enrollment instead of pulling from AD). 
    - This enables users to specify a different/common organizational name (e.g., CN = "Code Signing", E = "[sales@otherdomain.com](mailto:signing@otherdomain.com)").
- **Do NOT** select "Build from this Active Directory information" unless you want the cert tied to the user's actual AD name/UPN.

#### Step 6: Extensions Tab

- **Application Policies** → Ensure **Code Signing** is present (it should be inherited). 
    - You can add others if needed (e.g., **Time Stamping** via additional policies).
- **Key Usage**: Digital signature (required), non-repudiation (recommended).
- Optional: Add **Certificate Template Information** extension if you want to include metadata.

#### Step 7: Security Tab (Critical — Restrict Enrollment)

- Remove **Domain Users** / **Authenticated Users** if present (or set their permissions to **Read** only).
- Add your intended group(s), e.g.: 
    - A security group like "Code Signing Users" or "Developers - OtherDomain".
    - Grant them **Read** + **Enroll** (and **Autoenroll** if you want GPO auto-enrollment, though rare for custom-subject code signing).
- **Do not** give Domain Users Enroll unless this is intentional (very broad).

#### Step 8: Issue the New Template on Your CA

- Open **certsrv.msc** (Certification Authority snap-in) on your CA server.
- Right-click **Certificate Templates** → **New** → **Certificate Template to Issue**.
- Select your new template (e.g., Custom Code Signing - OtherDomain) → **OK**.

# Security - Code Signing Enroll User For Different Domain

This is how to enroll into a cert from the users computer.

#### How Users Enroll for Certificates with Custom ("Different") Domain Name

Users with Enroll permission can now request a certificate:

**Option A – Using MMC (easiest for testing)**

1. Run certmgr.msc (Current User).
2. Right-click **Personal** → **All Tasks** → **Request New Certificate**.
3. Select your enrollment policy (Active Directory Enrollment Policy).
4. Choose your new template.
5. When prompted, click **Details** → **Properties**.
6. On **Subject** tab: Enter custom values (e.g., Common name = "OtherDomain Code Signing Authority").
7. On **Subject** tab: Enter custom values (e.g., Organtization = "SFL Services LLC").
8. On **Subject** tab: Enter custom values (e.g., Locality = "Loveland").
9. On **Subject** tab: Enter custom values (e.g., State = "Ohio").
10. On **Subject** tab: Enter custom values (e.g., Country = "US").
11. On **Extensions** tab: Add SAN if needed (e.g., email=<signing@otherdomain.com>).
12. Enroll.

**Using certreq.exe (scriptable / automated)** Create an .inf file:

<div dir="auto" id="bkmrk-codesign-request.inf"><div data-testid="code-block"><div><div><div><div>codesign-request.inf</div></div></div><div>  
</div></div></div></div>```powershell
[Version]
Signature="$Windows NT$"

[NewRequest]
Subject = "CN=Code Signing, O=SFL Services LLC, L=Loveland, S=Ohio, C=US"
; You can make Subject empty if you prefer only SAN / no CN, but most code signing tools expect a CN
KeySpec = 1
KeyLength = 4096                   ; 3072 or 4096 is strongly recommended in 2025+
Exportable = TRUE                  ; Usually yes for code signing
MachineKeySet = FALSE              ; User context (most common for code signing)
SMIME = FALSE
PrivateKeyArchive = FALSE
UserProtected = FALSE
UseExistingKeySet = FALSE
ProviderName = "Microsoft Enhanced RSA and AES Cryptographic Provider"
ProviderType = 24
RequestType = PKCS10
KeyUsage = 0x80                    ; digitalSignature = required for code signing

[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.3              ; Code Signing EKU

; Optional: if you really want to add DNS SANs (rare for pure code signing)
[Extensions]
2.5.29.17 = "{text}"
_continue_ = "dns=www.sflservicesllc.com&"
_continue_ = "email=sales@sflservicesllc.com"
```

Then:

<div dir="auto" id="bkmrk-create-a-powershell-"><div data-testid="code-block"><div>Create a powershell script **createCert.ps1**, Run the script</div></div></div><div id="bkmrk-note%3A-change-the-tem">**Note:** Change the template name to the name you chose when creating [HERE](https://docs.sflservicesllc.com/books/security/page/security-create-a-code-signing-template "Code Signing Template Create") it with no spaces.</div>```powershell
certreq -new codesign-request.inf codesign.csr
certutil -dump codesign.csr
certreq -submit -attrib "CertificateTemplate:YourTemplateName" codesign.csr codesign.cer
certreq -accept codesign.cer
certutil -store my
```

# pfSense - Local System Config Backup and send to S3 Buckets

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIBRAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-to-automate-backing-" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_n">To automate backing up your pfSense configuration to Amazon S3, you can use pfSense's built-in **`rclone` package**. This eliminates the need for complex custom shell scripts because `rclone` can natively authenticate with AWS S3 and encrypt your files.</div><div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIBRAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_n"></div><div aria-owns="action-menu-parent-container" class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIBhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-here-is-the-step-by-" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_w">Here is the step-by-step guide to setting it up.</div><div aria-owns="action-menu-parent-container" class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIBhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk--1" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_w"></div><div aria-owns="action-menu-parent-container" class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIBhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-step-1%3A-install-the-" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_w"><div aria-level="3" class="otQkpb" data-animation-nesting="" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 600; margin: 24px 0px 12px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sae="" data-sfc-cp="" data-sfc-root="ep" jsaction="" jscontroller="a7qCn#ZxCkTb" jsuid="zOssqc_15" role="heading">Step 1: Install the Required Packages</div><div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAICBAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_16">pfSense does not include backup utilities or cron management by default. You need to install them from the Package Manager. [[1](https://www.youtube.com/watch?v=06bsVIwTHbk)]</div>1. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Log into your pfSense WebGUI.</span>
2. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Navigate to **System** &gt; **Package Manager** &gt; **Available Packages**.</span>
3. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Search for and install **`rclone`**.</span>
4. <span aria-owns="action-menu-parent-container" class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Search for and install **`cron`** (this gives you a visual interface to schedule the backup).</span>

</div>### Step 2: Configure Rclone for Amazon S3

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAICxAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-next%2C-create-a-conne" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_21">Next, create a connection profile (called a "remote") between your pfSense box and your S3 bucket.</div>1. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Connect to your pfSense firewall via **SSH** (or use the WebGUI via **Diagnostics** &gt; **Command Prompt**).</span>
2. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Run the rclone configuration tool:</span>```bash
    rclone config
    ```
    
    <div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDBAE" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_2m,zOssqc_2l" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_2k"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div><div class="LIBz9e" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 3px 0px 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" data-ved="2ahUKEwjW8N7ztpSWAxXeoCsGHdwePVsQh9gSegYIAAgMEAY" jsaction="" jscontroller="cXTEid#e0nEwf" jsuid="zOssqc_2n"><button aria-describedby="undefined" aria-label="Copy code text to clipboard." class="FTsWP RmjGdc IsqrXb" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);" data-is-tooltip-wrapper="undefined" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="c" data-tooltip-classes="undefined" id=""></button></div></div></div></div>
3. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Type **`n`** for "New remote" and name it **`s3-backup`**.</span>
4. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">When prompted for the storage type, type **`s3`** (or look for the number corresponding to Amazon S3).</span>
5. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Choose your S3 provider by typing **`Amazon`** (or press enter for the default AWS S3).</span>
6. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Select **`false`** for entering AWS credentials from the env\_auth.</span>
7. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Enter your AWS account details when prompted:</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**`access_key_id`**: *Your AWS Access Key*</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**`secret_access_key`**: *Your AWS Secret Key*</span>
8. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Select your AWS Region (e.g., `us-east-1`).</span>
9. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">For all other advanced settings (endpoint, ACLs, encryption), you can press **Enter** to accept the defaults.</span>
10. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Type **`y`** to confirm and save the configuration, then **`q`** to quit.</span>

<span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Optional if `rclone` is not available and i</span>nstall <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">`rclone` </span>Manually

<div class="Fsg96" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" id="bkmrk--2" jsaction="rcuQ6b:&eeCKC_1a|npT2md" jscontroller="KHhJQ#U8DOt" jsuid="eeCKC_1a"></div>#### 1. Download and Extract the Binary

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-ssh-into-your-pfsens" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="eeCKC_1h">SSH into your pfSense box (or use **Diagnostics** &gt; **Command Prompt**) and execute these commands to download the FreeBSD version of Rclone:</div><div class="Fsg96" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" id="bkmrk--3" jsaction="rcuQ6b:&eeCKC_1p|npT2md" jscontroller="KHhJQ#U8DOt" jsuid="eeCKC_1p"></div>```bash
# 1. Navigate to a temporary folder
cd /tmp

# 2. Download the official FreeBSD 64-bit binary zip archive
fetch https://downloads.rclone.org/v1.75.0/rclone-v1.75.0-freebsd-amd64.zip

# 3. Unzip the downloaded archive
tar -xf rclone-current-freebsd-amd64.zip
```

#### 2. Move `rclone` to the System Path

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIERAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-move-the-extracted-b" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="eeCKC_24">Move the extracted binary file into the folder where pfSense looks for standard utilities:</div><div class="Fsg96" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" id="bkmrk--4" jsaction="rcuQ6b:&eeCKC_2a|npT2md" jscontroller="KHhJQ#U8DOt" jsuid="eeCKC_2a"></div><div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIEhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="eeCKC_2d,eeCKC_2c" id="bkmrk--5" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="eeCKC_2b"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);" data-sae=""><div class="z0e9Qd" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="vVRw1d" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 500; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);">  
</div></div><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div></div></div>```bash
# 1. Move the executable binary into your local execution path
mv /tmp/rclone-*-freebsd-amd64/rclone /usr/local/bin/

# 2. Grant execution permissions to the binary file
chmod +x /usr/local/bin/rclone

# 3. Clean up the leftover installation files from /tmp
rm -rf /tmp/rclone-*

```

#### 3. Verify the Installation

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIFBAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-run-the-version-chec" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="eeCKC_2p">Run the version check command to verify it executes perfectly:</div><div class="Fsg96" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" id="bkmrk--6" jsaction="rcuQ6b:&eeCKC_2v|npT2md" jscontroller="KHhJQ#U8DOt" jsuid="eeCKC_2v"></div><div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIFRAA" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" data-wiz-uids="eeCKC_2y,eeCKC_2x" id="bkmrk-bash" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="eeCKC_2w"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);" data-sae=""><div class="z0e9Qd" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="vVRw1d" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 500; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);">bash</div></div><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div></div></div>```bash
rclone version
```

### Step 3: Create the Backup Script on pfSense

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-pfsense-stores-its-a" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_5b">pfSense stores its active configuration file at `/conf/config.xml`. We will write a simple 3-line script to copy this file, timestamp it, and upload it.</div>1. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">In the WebGUI, go to **Diagnostics** &gt; **Command Prompt**.</span>
2. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">In the **Execute Shell Command** box, run this command to create a backup directory:</span><div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDxAC" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_5s,zOssqc_5r" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_5q"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="z0e9Qd" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="vVRw1d" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 500; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);">bash</div></div><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div></div></div>```bash
    mkdir -p /root/backups
    ```
    
    <div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDxAC" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_5s,zOssqc_5r" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_5q"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div><div class="LIBz9e" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 3px 0px 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep" data-ved="2ahUKEwjW8N7ztpSWAxXeoCsGHdwePVsQh9gSegYIAAgPEAQ" jsaction="" jscontroller="cXTEid#e0nEwf" jsuid="zOssqc_5t"><button aria-describedby="undefined" aria-label="Copy code text to clipboard." class="FTsWP RmjGdc IsqrXb" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);" data-is-tooltip-wrapper="undefined" data-sfc-cp="" data-sfc-root="c" data-tooltip-classes="undefined" data-wiz-attrbind="disabled=zOssqc_5u/ggNWmb" id=""></button></div></div></div></div>
3. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Go to **Diagnostics** &gt; **Edit File**.</span>
4. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">In the **Path to file to edit** box, type: `/root/backup_pfsense.sh` and click **Load**.</span>
5. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Paste the following script into the text area:</span><div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDxAI" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_6a,zOssqc_69" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_68"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="z0e9Qd" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="vVRw1d" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 500; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);">bash</div></div><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div></div></div>```bash
    #!/bin/sh
    DATE=$(date +%Y%m%d-%H%M%S)
    BACKUP_FILE="/root/backups/pfsense-config-${DATE}.xml"
    
    # 1. Copy the live config to the local backup folder
    cp /conf/config.xml "${BACKUP_FILE}"
    
    # 2. Push the file to your S3 bucket (replace "your-bucket-name" with your actual bucket)
    /usr/local/bin/rclone copy "${BACKUP_FILE}" s3-backup:your-bucket-name/pfsense/
    
    # 3. Clean up local files older than 7 days to save space on pfSense
    find /root/backups/ -name "pfsense-config-*.xml" -type f -mtime +7 -delete
    ```
    
    <div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDxAI" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_6a,zOssqc_69" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_68"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div></div></div>
6. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Click **Save**.</span>
7. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Go back to **Diagnostics** &gt; **Command Prompt** and make the script executable by running:</span><div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDxAN" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_6o,zOssqc_6n" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_6m"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="z0e9Qd" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="vVRw1d" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 500; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);">bash</div></div><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div></div></div>```bash
    chmod +x /root/backup_pfsense.sh
    ```
    
    <div class="r1PmQe" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 4px 0px 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIDxAN" data-sfc-cp="" data-sfc-root="ep" data-wiz-uids="zOssqc_6o,zOssqc_6n" jsaction="" jscontroller="HP6Sjf#lcO7sb" jsuid="zOssqc_6m"><div data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);"><div class="pHpOfb" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div class="pCTyYe" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" dir="ltr"></div></div><div class="LIBz9e" data-animation-atomic="" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 3px 0px 0px; text-decoration: none; border-bottom: 1px solid rgb(44, 46, 53);"><div data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep" data-ved="2ahUKEwjW8N7ztpSWAxXeoCsGHdwePVsQh9gSegYIAAgPEA8" jsaction="" jscontroller="cXTEid#e0nEwf" jsuid="zOssqc_6p"><button aria-describedby="undefined" aria-label="Copy code text to clipboard." class="FTsWP RmjGdc IsqrXb" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);" data-is-tooltip-wrapper="undefined" data-sfc-cp="" data-sfc-root="c" data-tooltip-classes="undefined" data-wiz-attrbind="disabled=zOssqc_6q/ggNWmb" id=""></button></div></div></div></div>

<div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIEBAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-%28optional-testing%3A-y" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_6y">*(Optional Testing: You can test if it works right now by running `/root/backup_pfsense.sh` in the Command Prompt box and checking your S3 bucket).*</div><div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIEBAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk--7" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_6y"></div><div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIEBAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-step-4%3A-schedule-the" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_6y"><div aria-level="3" class="otQkpb" data-animation-nesting="" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 600; margin: 24px 0px 12px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sae="" data-sfc-cp="" data-sfc-root="ep" jsaction="" jscontroller="a7qCn#ZxCkTb" jsuid="zOssqc_79" role="heading">Step 4: Schedule the Automation with Cron</div><div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIEhAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_7a">Now, use the Cron package you installed in Step 1 to make this run automatically every day.</div>1. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Navigate to **Services** &gt; **Cron** in the WebGUI.</span> \[[1](https://opennix.org/en/docs/pfsense/development/pfsense-custom-scripts/)\]
2. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Click **+ Add** to create a new cron job.</span>
3. <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Configure the schedule (e.g., to run daily at 3:00 AM):</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Minute**: `0`</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Hour**: `3`</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Day of the Month**: `*`</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Month**: `*`</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Day of the Week**: `*`</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**User**: `root`</span>
    - <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Command**: `/root/backup_pfsense.sh`</span>
4. <span aria-owns="action-menu-parent-container" class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">Click **Save**.</span>

</div><div aria-level="3" class="otQkpb" data-animation-nesting="" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 20px; font-weight: 600; margin: 24px 0px 12px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sae="" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-%F0%9F%94%92-security-warning-f" jsaction="" jscontroller="a7qCn#ZxCkTb" jsuid="zOssqc_99" role="heading">🔒 Security Warning for pfSense Backups</div><div class="n6owBd awi2gc" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-hveid="CAAIFRAA" data-processed="true" data-sfc-cp="" data-sfc-root="ep" id="bkmrk-your-config.xml-file" jsaction="" jscontroller="TDBkbc#Ml18Xb" jsuid="zOssqc_9a">Your `config.xml` file contains your firewall's root password hashes, VPN private keys, and network topology.</div>- <span class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Encrypt the Remote Bucket:** Ensure your S3 bucket has Server-Side Encryption (SSE) turned on.</span>
- <span aria-owns="action-menu-parent-container" class="iNqyIf" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-sfc-cp="" data-sfc-root="ep">**Alternative (Rclone Encryption):** If you want absolute zero-knowledge security, you can run `rclone config` again, add a new remote of type **`crypt`**, and point it at `s3-backup:your-bucket-name`. This will encrypt the file locally on pfSense *before* it touches AWS infrastructure.</span>

<div class="Fsg96" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" id="bkmrk--8" jsaction="rcuQ6b:&zOssqc_78|npT2md" jscontroller="KHhJQ#U8DOt" jsuid="zOssqc_78"></div><div class="Fsg96" data-complete="true" data-copy-service-computed-style="font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);" data-processed="true" data-sfc-cp="" data-sfc-inited="2" data-sfc-root="ep" id="bkmrk--9" jsaction="rcuQ6b:&zOssqc_59|npT2md" jscontroller="KHhJQ#U8DOt" jsuid="zOssqc_59"></div>