Skip to content

Commit 6e385c3

Browse files
authored
[ZT] Generate root CA (#11761)
1 parent 5258e9c commit 6e385c3

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

content/cloudflare-one/connections/connect-devices/warp/user-side-certificates/custom-certificate.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,47 @@ Only available on Enterprise plans.
1414

1515
Enterprise customers who do not wish to install the [Cloudflare certificate](/cloudflare-one/connections/connect-devices/warp/user-side-certificates/install-cloudflare-cert/) have the option to upload their own root certificate to Cloudflare. Gateway will use your uploaded certificate to encrypt all sessions between the end user and Gateway, enabling all HTTPS inspection features that previously required the Cloudflare certificate. You can upload multiple certificates to your account, but only one can be active at any given time. You also need to upload a private key to intercept domains with JIT certificates and to enable the [block page](/cloudflare-one/policies/gateway/configuring-block-page/).
1616

17-
To generate a custom root CA, refer to [IBM's documentation](https://www.ibm.com/docs/en/runbook-automation?topic=certificate-generate-root-ca-key).
18-
1917
{{<Aside type="warning">}}
2018
Custom certificates are limited to use between your users and the Gateway proxy. Connections between Gateway and the origin server will use the Cloudflare certificate.
2119
{{</Aside>}}
2220

23-
When preparing your certificate and private key for upload, be sure to remove any unwanted characters, such as mismatching subdomains in the certificate's common name.
21+
## Generate a custom root CA
22+
23+
Before you generate a custom root CA, make sure you have [OpenSSL](https://www.openssl.org/) installed.
24+
25+
1. Open a terminal.
26+
2. Create a directory for the root CA and change into it.
27+
28+
```sh
29+
$ mkdir -p /root/customca
30+
$ cd /root/customca
31+
```
32+
33+
3. Generate a private key for the root CA.
34+
35+
```sh
36+
$ openssl genrsa -out <CUSTOM-ROOT-PRIVATE-KEY>.pem 2048
37+
```
38+
39+
4. Generate a self-signed root certificate.
40+
41+
```sh
42+
$ openssl req -x509 -sha256 -new -nodes -key <CUSTOM-ROOT-PRIVATE-KEY>.pem -days 365 -out <CUSTOM-ROOT-CERT>.pem
43+
```
44+
45+
When preparing your certificate and private key for upload, be sure to remove any unwanted characters, such as mismatching subdomains in the certificate's common name. To review the private key, run the following command:
46+
47+
```sh
48+
$ openssl rsa -in <CUSTOM-ROOT-PRIVATE-KEY>.key -text
49+
```
50+
51+
To review the certificate, run the following command:
52+
53+
```sh
54+
$ openssl x509 -in <CUSTOM-ROOT-CERT>.pem -text
55+
```
2456

25-
To deploy a custom root certificate:
57+
## Deploy a custom root certificate
2658

2759
1. Verify that the certificate is installed on your devices.
2860

0 commit comments

Comments
 (0)