This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| custom_ssl_cert_local_cert_authority [2025/11/12 23:28] – [Set up a Custom SSL Cert - Notes and Troubleshooting] -Formatting hogwild | custom_ssl_cert_local_cert_authority [2025/11/26 00:15] (current) – [Set up a Custom SSL Cert - Notes and Troubleshooting] hogwild | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Set up a Custom SSL Cert using Local CA & Cert-Signing Request ====== | ====== Set up a Custom SSL Cert using Local CA & Cert-Signing Request ====== | ||
| - | This HOWTO takes you through all the steps needed to create: \\ | + | |
| - | \\ | + | This HOWTO takes you through all the steps needed to create: \\ |
| - A root certificate authority (CA) | - A root certificate authority (CA) | ||
| - An intermediate certificate authority (ICA) | - An intermediate certificate authority (ICA) | ||
| - An SSL key, certificate request (CS) | - An SSL key, certificate request (CS) | ||
| - A signed certificate. | - A signed certificate. | ||
| - | \\ | + | |
| - | It then shows you how to distribute these, and install them in FreshTomato NVRAM. The setup was done on an r2025.3 build, but should work fine on releases | + | \\ It then shows you how to distribute these, and install them in FreshTomato NVRAM. The setup was done on an r2025.3 build, but should work fine on r2023 and later. |
| The **steps involved in creating the Local Certificate Authority, Certificates and Signing Request can be run only on Linux**. If your main computing device isn't running Linux, it is recommended that you create a Live, bootable Linux USB flash drive on which to perform these tasks. This media should be configured with persistent storage. The FreshTomato team may attempt to find ways to allow all these tasks to be done directly in FreshTomato. | The **steps involved in creating the Local Certificate Authority, Certificates and Signing Request can be run only on Linux**. If your main computing device isn't running Linux, it is recommended that you create a Live, bootable Linux USB flash drive on which to perform these tasks. This media should be configured with persistent storage. The FreshTomato team may attempt to find ways to allow all these tasks to be done directly in FreshTomato. | ||
| Line 18: | Line 19: | ||
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| | | ||
| - | - A FreshTomato router with approximately 2.5 kB of free NVRAM. \\ (Check "Used / Total NVRAM" in the Overview menu) | + | - A FreshTomato router with approximately 2.5 kB of free NVRAM. \\ (Check "Used / Total NVRAM" in the Overview menu) \\ \\ |
| - Any Linux distro with which you are comfortable. \\ The Certificate Authority will be built in the "/ | - Any Linux distro with which you are comfortable. \\ The Certificate Authority will be built in the "/ | ||
| | | ||
| Line 433: | Line 433: | ||
| | | ||
| ==== Set up Root with Elliptical Curve SSH Keys ==== | ==== Set up Root with Elliptical Curve SSH Keys ==== | ||
| - | \\ | + | |
| - | (This is done with root credentials because the certificates must be installed in FreshTomato. Using root access helps avoid unsecured steps in between). \\ | + | \\ (This is done with root credentials because the certificates must be installed in FreshTomato. Using root access helps avoid unsecured steps in between). \\ \\ Change to the: "/ |
| - | \\ | + | |
| - | Change to the: "/ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Generate a public | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Display the contents of the public SSH key file: "/ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | (The contents should look similar to: " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Now, connect to the router' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Uncheck: \\ | + | |
| * "Allow password login" | * "Allow password login" | ||
| * "WAN access" | * "WAN access" | ||
| - | \\ Now, check: \\ | + | \\ Now, check: \\ |
| - | * " | + | * " |
| - | | + | |
| - | \\ | + | \\ \\ \\ \\ Finally, click "Start Now" to restart the SSH server. \\ \\ \\ \\ |
| - | \\ | + | |
| - | \\ | + | |
| - | Finally, click "Start Now" to restart the SSH server. \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| ==== Upload the Custom Certificates / Key to the Router and Write them to NVRAM ==== | ==== Upload the Custom Certificates / Key to the Router and Write them to NVRAM ==== | ||
| - | \\ | + | |
| - | Using the secure copy command (and legacy protocol), copy the: " | + | \\ Using the secure copy command (and legacy protocol), copy the: " |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Run the SSH command to connect via SSH to the root account on the host router named: " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Rename the file: " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Rename the file: " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Concatenate the contents of the " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Copy the " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Copy the " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Run the stream text editor, make it open the " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Run the tar command and compress the " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | ''/ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Run the gzip archive tool to further compress the " | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | ''/ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Encode the "/ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Commit all the changes to NVRAM: \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | Finally, restart the HTTP daemon: \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | '' | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | The " | + | |
| - | \\ | + | |
| - | The process is now complete. Now, you should be able to access your FreshTomato web interface using the custom certificates you created with your own CA. If something isn't working, review all steps and double-check that they were properly completed. \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| ===== Set up a Custom SSL Cert - Notes and Troubleshooting ===== | ===== Set up a Custom SSL Cert - Notes and Troubleshooting ===== | ||
| - | \\ | + | |
| - | Download the two configuration files needed to create the Custom Certificate Authority here: \\ | + | \\ Download the two configuration files needed to create the Custom Certificate Authority here: \\ |
| - | \\ | + | |
| - | \\ | + | |
| - {{ca.openssl.cnf.zip}} | - {{ca.openssl.cnf.zip}} | ||
| - {{intermediateca.openssl.cnf.zip}} | - {{intermediateca.openssl.cnf.zip}} | ||
| - | \\ | + | |
| - | \\ | + | \\ |
| - | The OpenSSL ccparam subcommand doesn' | + | |
| - | \\ | + | \\ |
| - | '' | + | |
| - | \\ | + | \\ Since r2025.3, FreshTomato doesn' |
| - | \\ | + | |
| - | | + | |
| - | Since r2025.3, FreshTomato doesn' | + | |
| - | \\ | + | |
| * In the web interface, go to the [[admin_access|Admin Access]] menu and check the CN under "SSL Certificate" | * In the web interface, go to the [[admin_access|Admin Access]] menu and check the CN under "SSL Certificate" | ||
| * Connect via SSH to FreshTomato and run the following commands: | * Connect via SSH to FreshTomato and run the following commands: | ||
| Line 621: | Line 473: | ||
| * If you clicked " | * If you clicked " | ||
| * At this point you can go back to SSH and change back your CN and commit or, of test it further. \\ | * At this point you can go back to SSH and change back your CN and commit or, of test it further. \\ | ||
| + | |||
| + | | ||