CA erstellen inklusive 2 Server Zertifikate: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→fw2) |
(→Server) |
||
| Zeile 108: | Zeile 108: | ||
Organizational Unit Name (eg, section) []:. | Organizational Unit Name (eg, section) []:. | ||
Common Name (e.g. server FQDN or YOUR name) []:fw1 | Common Name (e.g. server FQDN or YOUR name) []:fw1 | ||
| + | Email Address []:. | ||
| + | |||
| + | Please enter the following 'extra' attributes | ||
| + | to be sent with your certificate request | ||
| + | A challenge password []: | ||
| + | An optional company name []: | ||
| + | </pre> | ||
| + | |||
| + | ===Zertifikate signieren=== | ||
| + | openssl x509 -req -days 730 -in $COMMONNAME.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out $COMMONNAME.crt | ||
| + | ==fw2== | ||
| + | *COMMONNAME="fw2" | ||
| + | ===Private Key erstellen=== | ||
| + | *openssl genrsa -out $COMMONNAME.key 4096 | ||
| + | Generating RSA private key, 4096 bit long modulus (2 primes) | ||
| + | ..++++ | ||
| + | ...................................++++ | ||
| + | e is 65537 (0x010001) | ||
| + | ===Zertifikatsrequest erstellen=== | ||
| + | *openssl req -new -key $COMMONNAME.key -out $COMMONNAME.csr | ||
| + | <pre> | ||
| + | You are about to be asked to enter information that will be incorporated | ||
| + | into your certificate request. | ||
| + | What you are about to enter is what is called a Distinguished Name or a DN. | ||
| + | There are quite a few fields but you can leave some blank | ||
| + | For some fields there will be a default value, | ||
| + | If you enter '.', the field will be left blank. | ||
| + | ----- | ||
| + | Country Name (2 letter code) [AU]:. | ||
| + | State or Province Name (full name) [Some-State]:. | ||
| + | Locality Name (eg, city) []:. | ||
| + | Organization Name (eg, company) [Internet Widgits Pty Ltd]:. | ||
| + | Organizational Unit Name (eg, section) []:. | ||
| + | Common Name (e.g. server FQDN or YOUR name) []:fw2 | ||
Email Address []:. | Email Address []:. | ||
Version vom 5. September 2022, 09:30 Uhr
Arbeitsverzeichnis erstellen
- mkdir ca
- cd ca
CA
Private Key der CA erstellen
- openssl genrsa -aes256 -out ca.key 4096
Generating RSA private key, 4096 bit long modulus (2 primes) ..............................................................................................................................................................................................................................................................................................++++ ..............................................++++ e is 65537 (0x010001) Enter passmkdir ca root@fw1:~# openssl genrsa -aes256 -out ca.key 4096 Generating RSA private key, 4096 bit long modulus (2 primes) ..............................................................................................................................................................................................................................................................................................++++ ..............................................++++ e is 65537 (0x010001) Enter pass phrase for ca.key: Verifying - Enter pass phrase for ca.key:
- Passwort merken
CA selbstsignieren
- openssl req -new -key ca.key -x509 -days 3650 -out ca.crt
- Enter pass phrase for ca.key:
You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:. Organizational Unit Name (eg, section) []:. Common Name (e.g. server FQDN or YOUR name) []:vpn-ca Email Address []:. root@fw1:~# phrase for ca.key: Verifying - Enter pass phrase for ca.key: root@fw1:~# openssl req -new -key ca.key -x509 -days 3650 -out ca.crt Enter pass phrase for ca.mkdir ca root@fw1:~# openssl genrsa -aes256 -out ca.key 4096 Generating RSA private key, 4096 bit long modulus (2 primes) ..............................................................................................................................................................................................................................................................................................++++ ..............................................++++ e is 65537 (0x010001) Enter pass phrase for ca.key: Verifying - Enter pass phrase for ca.key: root@fw1:~# openssl req -new -key ca.key -x509 -days 3650 -out ca.crt Enter pass phrase for ca.key: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:. Organizational Unit Name (eg, section) []:. Common Name (e.g. server FQDN or YOUR name) []:vpn-ca Email Address []:. root@fw1:~# key: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:. Organizational Unit Name (eg, section) []:. Common Name (e.g. server FQDN or YOUR name) []:vpn-ca Email Address []:.
Server
fw1
- COMMONNAME="fw1"
Private Key erstellen
- openssl genrsa -out $COMMONNAME.key 4096
Generating RSA private key, 4096 bit long modulus (2 primes) ..++++ ...................................++++ e is 65537 (0x010001)
Zertifikatsrequest erstellen
- openssl req -new -key $COMMONNAME.key -out $COMMONNAME.csr
You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:. Organizational Unit Name (eg, section) []:. Common Name (e.g. server FQDN or YOUR name) []:fw1 Email Address []:. Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
Zertifikate signieren
openssl x509 -req -days 730 -in $COMMONNAME.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out $COMMONNAME.crt
fw2
- COMMONNAME="fw2"
Private Key erstellen
- openssl genrsa -out $COMMONNAME.key 4096
Generating RSA private key, 4096 bit long modulus (2 primes) ..++++ ...................................++++ e is 65537 (0x010001)
Zertifikatsrequest erstellen
- openssl req -new -key $COMMONNAME.key -out $COMMONNAME.csr
You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:. Organizational Unit Name (eg, section) []:. Common Name (e.g. server FQDN or YOUR name) []:fw2 Email Address []:. Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
Zertifikate signieren
openssl x509 -req -days 730 -in $COMMONNAME.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out $COMMONNAME.crt