tachtler:graylog_archlinux
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:graylog_archlinux [2022/01/29 14:39] – [Installation: Graylog] klaus | tachtler:graylog_archlinux [2023/05/21 09:54] (aktuell) – [Graylog: Gruppe und Benutzer anlegen] klaus | ||
---|---|---|---|
Zeile 46: | Zeile 46: | ||
Mit nachfolgendem Befehl, kann das '' | Mit nachfolgendem Befehl, kann das '' | ||
+ | < | ||
+ | # pacman --noconfirm -S pwgen | ||
+ | </ | ||
+ | ++++ Installationsverlauf | | ||
< | < | ||
# pacman --noconfirm -S pwgen | # pacman --noconfirm -S pwgen | ||
Zeile 76: | Zeile 80: | ||
==> root: 7 | ==> root: 7 | ||
</ | </ | ||
+ | ++++ | ||
- | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | + | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' |
+ | < | ||
+ | # pacman -Qil pwgen | ||
+ | </ | ||
+ | ++++ Installierte Dateien | | ||
< | < | ||
# pacman -Qil pwgen | # pacman -Qil pwgen | ||
Zeile 110: | Zeile 119: | ||
pwgen / | pwgen / | ||
</ | </ | ||
+ | ++++ | ||
===== Installation: | ===== Installation: | ||
Zeile 116: | Zeile 126: | ||
* [[tachtler: | * [[tachtler: | ||
erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | ||
+ | < | ||
+ | # pikaur --noconfirm -S mongodb44-bin | ||
+ | </ | ||
+ | ++++ Installationsverlauf | | ||
< | < | ||
# pikaur --noconfirm -S mongodb44-bin | # pikaur --noconfirm -S mongodb44-bin | ||
Zeile 217: | Zeile 231: | ||
==> root: 9 | ==> root: 9 | ||
</ | </ | ||
+ | ++++ | ||
- | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | + | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' |
+ | < | ||
+ | # pacman -Qil mongodb44-bin | ||
+ | </ | ||
+ | ++++ Installierte Dateien | | ||
< | < | ||
# pacman -Qil mongodb44-bin | # pacman -Qil mongodb44-bin | ||
Zeile 270: | Zeile 289: | ||
mongodb44-bin / | mongodb44-bin / | ||
</ | </ | ||
+ | ++++ | ||
+ | |||
+ | Nachdem das '' | ||
+ | * [[tachtler: | ||
+ | erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | ||
+ | < | ||
+ | # pikaur --noconfirm -S mongodb-tools | ||
+ | </ | ||
+ | ++++ Installationsverlauf | | ||
+ | < | ||
+ | # pikaur --noconfirm -S mongodb-tools | ||
+ | Reading repository package databases... | ||
+ | Reading local package database... | ||
+ | Resolving AUR dependencies... | ||
+ | looking for conflicting AUR packages... | ||
+ | Not showing diff for mongodb-tools package (--noconfirm) | ||
+ | :: Skipping review of PKGBUILD for mongodb-tools package (--noconfirm) | ||
+ | |||
+ | Reading local package database... | ||
+ | :: Installing repository dependencies for mongodb-tools: | ||
+ | resolving dependencies... | ||
+ | looking for conflicting packages... | ||
+ | |||
+ | Package (1) New Version | ||
+ | |||
+ | community/ | ||
+ | |||
+ | Total Download Size: 36.30 MiB | ||
+ | Total Installed Size: 196.00 MiB | ||
+ | |||
+ | :: Proceed with installation? | ||
+ | :: Retrieving packages... | ||
+ | | ||
+ | (1/1) checking keys in keyring | ||
+ | (1/1) checking package integrity | ||
+ | (1/1) loading package files [###################### | ||
+ | (1/1) checking for file conflicts | ||
+ | (1/1) checking available disk space [###################### | ||
+ | :: Running pre-transaction hooks... | ||
+ | (1/1) Performing snapper pre snapshots for the following configurations... | ||
+ | ==> root: 51 | ||
+ | :: Processing package changes... | ||
+ | (1/1) installing go [###################### | ||
+ | :: Running post-transaction hooks... | ||
+ | (1/2) Arming ConditionNeedsUpdate... | ||
+ | (2/2) Performing snapper post snapshots for the following configurations... | ||
+ | ==> root: 52 | ||
+ | Reading local package database... | ||
+ | |||
+ | :: Starting the build: | ||
+ | Running as unit: run-u401.service | ||
+ | Press ^] three times within 1s to disconnect TTY. | ||
+ | ==> Making package: mongodb-tools 1:100.7.0-1 (Sun 14 May 2023 07:35:38 PM CEST) | ||
+ | ==> Checking runtime dependencies... | ||
+ | ==> Checking buildtime dependencies... | ||
+ | ==> Retrieving sources... | ||
+ | -> Downloading mongodb-tools-100.7.0.tar.gz... | ||
+ | % Total % Received % Xferd Average Speed | ||
+ | | ||
+ | 0 | ||
+ | 100 4311k 0 4311k 0 | ||
+ | ==> Validating source files with sha256sums... | ||
+ | mongodb-tools-100.7.0.tar.gz ... Passed | ||
+ | ==> Extracting sources... | ||
+ | -> Extracting mongodb-tools-100.7.0.tar.gz with bsdtar | ||
+ | ==> Starting prepare()... | ||
+ | ==> Starting build()... | ||
+ | go: downloading github.com/ | ||
+ | go: downloading github.com/ | ||
+ | go: downloading github.com/ | ||
+ | go: downloading github.com/ | ||
+ | go: downloading github.com/ | ||
+ | go: downloading golang.org/ | ||
+ | go: downloading github.com/ | ||
+ | START | build | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | go: downloading go.mongodb.org/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading gopkg.in/ | ||
+ | | go: downloading golang.org/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading golang.org/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading golang.org/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading golang.org/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | go: downloading gopkg.in/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | go: downloading github.com/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | | rm: bin/ | ||
+ | | exec: '/ | ||
+ | FINISH | build in 27.013235818s | ||
+ | --------------- | ||
+ | Completed in 27.01522859s | ||
+ | ==> Entering fakeroot environment... | ||
+ | ==> Starting package()... | ||
+ | ==> Tidying install... | ||
+ | -> Removing libtool files... | ||
+ | -> Purging unwanted files... | ||
+ | -> Removing static library files... | ||
+ | -> Stripping unneeded symbols from binaries and libraries... | ||
+ | -> Compressing man and info pages... | ||
+ | ==> Checking for packaging issues... | ||
+ | ==> Creating package " | ||
+ | -> Generating .PKGINFO file... | ||
+ | -> Generating .BUILDINFO file... | ||
+ | -> Generating .MTREE file... | ||
+ | -> Compressing package... | ||
+ | ==> Leaving fakeroot environment. | ||
+ | ==> Finished making: mongodb-tools 1:100.7.0-1 (Sun 14 May 2023 07:36:38 PM CEST) | ||
+ | Finished with result: success | ||
+ | Main processes terminated with: code=exited/ | ||
+ | Service runtime: 1min 197ms | ||
+ | CPU time consumed: 1min 10.325s | ||
+ | |||
+ | :: Removing already installed dependencies for mongodb-tools: | ||
+ | checking dependencies... | ||
+ | |||
+ | Package (1) Old Version | ||
+ | |||
+ | go | ||
+ | |||
+ | Total Removed Size: 196.00 MiB | ||
+ | |||
+ | :: Do you want to remove these packages? [Y/n] | ||
+ | :: Running pre-transaction hooks... | ||
+ | (1/1) Performing snapper pre snapshots for the following configurations... | ||
+ | ==> root: 53 | ||
+ | :: Processing package changes... | ||
+ | (1/1) removing go [###################### | ||
+ | :: Running post-transaction hooks... | ||
+ | (1/2) Arming ConditionNeedsUpdate... | ||
+ | (2/2) Performing snapper post snapshots for the following configurations... | ||
+ | ==> root: 54 | ||
+ | loading packages... | ||
+ | resolving dependencies... | ||
+ | looking for conflicting packages... | ||
+ | |||
+ | Package (1) New Version | ||
+ | |||
+ | mongodb-tools | ||
+ | |||
+ | Total Installed Size: 88.70 MiB | ||
+ | |||
+ | :: Proceed with installation? | ||
+ | (1/1) checking keys in keyring | ||
+ | (1/1) checking package integrity | ||
+ | (1/1) loading package files [###################### | ||
+ | (1/1) checking for file conflicts | ||
+ | (1/1) checking available disk space [###################### | ||
+ | :: Running pre-transaction hooks... | ||
+ | (1/1) Performing snapper pre snapshots for the following configurations... | ||
+ | ==> root: 55 | ||
+ | :: Processing package changes... | ||
+ | (1/1) installing mongodb-tools | ||
+ | :: Running post-transaction hooks... | ||
+ | (1/2) Arming ConditionNeedsUpdate... | ||
+ | (2/2) Performing snapper post snapshots for the following configurations... | ||
+ | ==> root: 56 | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
+ | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | ||
+ | < | ||
+ | # pacman -Qil mongodb-tools | ||
+ | </ | ||
+ | ++++ Installierte Dateien | | ||
+ | < | ||
+ | # pacman -Qil mongodb-tools | ||
+ | Name : mongodb-tools | ||
+ | Version | ||
+ | Description | ||
+ | Architecture | ||
+ | URL : https:// | ||
+ | Licenses | ||
+ | Groups | ||
+ | Provides | ||
+ | Depends On : glibc krb5 | ||
+ | Optional Deps : None | ||
+ | Required By : None | ||
+ | Optional For : mongodb-bin | ||
+ | Conflicts With : None | ||
+ | Replaces | ||
+ | Installed Size : 88.70 MiB | ||
+ | Packager | ||
+ | Build Date : Sun 14 May 2023 07:35:37 PM CEST | ||
+ | Install Date : Sun 14 May 2023 07:36:40 PM CEST | ||
+ | Install Reason | ||
+ | Install Script | ||
+ | Validated By : None | ||
+ | |||
+ | mongodb-tools /usr/ | ||
+ | mongodb-tools /usr/bin/ | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | mongodb-tools / | ||
+ | </ | ||
+ | ++++ | ||
==== MongoDB: Dienst/ | ==== MongoDB: Dienst/ | ||
Zeile 535: | Zeile 776: | ||
</ | </ | ||
- | Anschließend | + | Anschliessend |
< | < | ||
# chown klaus:klaus / | # chown klaus:klaus / | ||
</ | </ | ||
- | Anschließend | + | Anschliessend |
< | < | ||
# exit | # exit | ||
Zeile 563: | Zeile 804: | ||
</ | </ | ||
- | Anschließend | + | Anschliessend |
< | < | ||
$ cd / | $ cd / | ||
Zeile 599: | Zeile 840: | ||
:!: **WICHTIG** - Der verwendete Benutzer, hier: '' | :!: **WICHTIG** - Der verwendete Benutzer, hier: '' | ||
+ | < | ||
+ | $ makepkg -cCfs | ||
+ | </ | ||
+ | ++++ Kompilierungsverlauf | | ||
< | < | ||
$ makepkg -cCfs | $ makepkg -cCfs | ||
Zeile 743: | Zeile 988: | ||
==> Cleaning up... | ==> Cleaning up... | ||
</ | </ | ||
+ | ++++ | ||
Das erneute Auflisten des Inhalts des Verzeichnisses ''/ | Das erneute Auflisten des Inhalts des Verzeichnisses ''/ | ||
Zeile 770: | Zeile 1016: | ||
Nachfolgemder Befehl führt nun die Installation des soeben erstellten **pacman**-Pakets durch: | Nachfolgemder Befehl führt nun die Installation des soeben erstellten **pacman**-Pakets durch: | ||
+ | < | ||
+ | # pacman -U / | ||
+ | </ | ||
+ | ++++ Installationsverlauf | | ||
< | < | ||
# pacman -U / | # pacman -U / | ||
Zeile 804: | Zeile 1054: | ||
==> root: 37 | ==> root: 37 | ||
</ | </ | ||
+ | ++++ | ||
- | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | + | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' |
+ | < | ||
+ | # pacman -Qil elasticsearch-xpack | ||
+ | </ | ||
+ | ++++ Installierte Dateien | | ||
< | < | ||
# pacman -Qil elasticsearch-xpack | # pacman -Qil elasticsearch-xpack | ||
Zeile 1454: | Zeile 1709: | ||
elasticsearch-xpack / | elasticsearch-xpack / | ||
</ | </ | ||
+ | ++++ | ||
==== Elasticsearch: | ==== Elasticsearch: | ||
Zeile 1778: | Zeile 2034: | ||
* [[tachtler: | * [[tachtler: | ||
erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | ||
+ | < | ||
+ | # pikaur --noconfirm -S graylog | ||
+ | </ | ||
+ | ++++ Installationsverlauf | | ||
< | < | ||
# pikaur --noconfirm -S graylog | # pikaur --noconfirm -S graylog | ||
Zeile 1868: | Zeile 2128: | ||
==> root: 39 | ==> root: 39 | ||
</ | </ | ||
+ | ++++ | ||
:!: **HINWEIS** - Der Fehler | :!: **HINWEIS** - Der Fehler | ||
Zeile 1876: | Zeile 2137: | ||
Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | ||
+ | < | ||
+ | # pacman -Qil graylog | ||
+ | </ | ||
+ | ++++ Installierte Dateien | | ||
< | < | ||
# pacman -Qil graylog | # pacman -Qil graylog | ||
Zeile 1927: | Zeile 2192: | ||
graylog / | graylog / | ||
</ | </ | ||
+ | ++++ | ||
==== Graylog: Dienst/ | ==== Graylog: Dienst/ | ||
Zeile 2795: | Zeile 3061: | ||
==== Graylog: Gruppe und Benutzer anlegen ==== | ==== Graylog: Gruppe und Benutzer anlegen ==== | ||
+ | |||
+ | :!: **HINWEIS** - **Ab Version 5.1.0-2 __NICHT__ mehr erforderlich!** | ||
Mit nachfolgendem Befehl, soll eine Gruppe mit dem Namen '' | Mit nachfolgendem Befehl, soll eine Gruppe mit dem Namen '' | ||
Zeile 2822: | Zeile 3090: | ||
Damit beim ersten Start des [[https:// | Damit beim ersten Start des [[https:// | ||
< | < | ||
- | # chown graylog: | + | # chown graylog: |
</ | </ | ||
Zeile 2866: | Zeile 3134: | ||
{{: | {{: | ||
+ | ===== Graylog TLS-Zertifikat erstellen ===== | ||
+ | |||
+ | Um entsprechenden **Inputs** des [[https:// | ||
+ | |||
+ | Um die Verschlüsselung einsetzen zu können, sind folgende Komponenten erforderlich: | ||
+ | * eine eigen **Certificate Authority (CA)**, welche **Self-Signed-Certificate** (Selbst erstelltes/ | ||
+ | * einen **CSR (Certificate Request)**, welcher von einer **Certificate Authority (CA)** signiert wird | ||
+ | * einem **private key (privaten Schlüssel)**, | ||
+ | * das **CRT (Certificate)** selbst, welcher von der **Certificate Authority (CA)** ausgestellt wird | ||
+ | |||
+ | Zur Erstellung eines **Self-Signed-Certificate** und zur Erstellung der oben genannten Komponenten, | ||
+ | * **'' | ||
+ | benötigt, welches i.d.R. bereits installiert sein sollte. | ||
+ | |||
+ | Abschliessend soll mit nachfolgendem Befehl in das Verzeichnis ''/ | ||
+ | < | ||
+ | # cd /etc/ssl | ||
+ | </ | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Nachfolgende Anpassungen müssen mindestens in der Konfigurationsdatei ''/ | ||
+ | |||
+ | (**__Nur relevanter Ausschnitt__**): | ||
+ | <code ini> | ||
+ | [ v3_req ] | ||
+ | |||
+ | # Extensions to add to a certificate request | ||
+ | |||
+ | basicConstraints = CA:FALSE | ||
+ | keyUsage = nonRepudiation, | ||
+ | # Tachtler - NEW - | ||
+ | subjectAltName = @alt_names | ||
+ | |||
+ | # Tachtler - NEW - | ||
+ | [ alt_names ] | ||
+ | DNS.1 = localhost | ||
+ | DNS.2 = 127.0.0.1 | ||
+ | DNS.3 = ::1 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * //Danke an Stefan Mayr für den Hinweis das Zertifikat mit **S**ubject **A**lternative **N**ames auszustatten → Hintergrund: | ||
+ | | ||
+ | | ||
+ | |||
+ | ==== Erstellen CA (Certificate Authority) ==== | ||
+ | |||
+ | Zur Erstellung einer eigene **Certificate Authority (CA)** kann ein Script, welches bei der Installation von '' | ||
+ | * **''/ | ||
+ | |||
+ | :!: **HINWEIS** - **Um Subject Alternative Names hinzufügen zu können, muss nachfolgende __zweite__ Ergänzung abgeändert werden, das sonst die '' | ||
+ | |||
+ | :!: **HINWEIS** - **Die zu erstellende Certificate Authority (CA) hat __standardmässig__ eine Laufzeit von __3 Jahren__ !!!** | ||
+ | |||
+ | Falls eine längere Laufzeit als **drei Jahre** gewünscht sein soll, kann nachfolgender Parameter im Skript, in nachfolgendem Verzeichnis, | ||
+ | * **''/ | ||
+ | **angepasst** werden: | ||
+ | |||
+ | (**Nur relevanter Ausschnitt**) | ||
+ | <code perl> | ||
+ | ... | ||
+ | # Tachtler | ||
+ | # default: my $DAYS = "-days 365"; | ||
+ | my $DAYS = "-days 28023"; | ||
+ | # Tachtler | ||
+ | # default: my $CADAYS = "-days 1095"; | ||
+ | my $CADAYS = "-days 28024"; | ||
+ | ... | ||
+ | ... | ||
+ | ... | ||
+ | } elsif ($WHAT eq ' | ||
+ | $RET = run(" | ||
+ | # Tachtler | ||
+ | # default: . " -infiles $NEWREQ $EXTRA{ca}" | ||
+ | . " -extensions v3_req -infiles $NEWREQ $EXTRA{ca}" | ||
+ | print " | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | :!: **WICHTIG** - **Die Laufzeit der // | ||
+ | |||
+ | Folgender Aufruf erstellt eine eigene **Certificate Authority (CA)**: | ||
+ | |||
+ | :!: **HINWEIS** - **Nicht benötigte Angaben werden mit Eingabe eines Punktes [.] übersprungen**! | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ | <code perl> | ||
+ | # / | ||
+ | CA certificate filename (or enter to create) | ||
+ | |||
+ | Making CA certificate ... | ||
+ | ==== | ||
+ | openssl req -new -keyout / | ||
+ | Generating a RSA private key | ||
+ | .............................+++++ | ||
+ | ......+++++ | ||
+ | writing new private key to '/ | ||
+ | Enter PEM pass phrase: | ||
+ | Verifying - Enter PEM pass phrase: | ||
+ | ----- | ||
+ | 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 ' | ||
+ | ----- | ||
+ | Country Name (2 letter code) [AU]:DE | ||
+ | State or Province Name (full name) [Some-State]: | ||
+ | Locality Name (eg, city) []:Munich (Muenchen) | ||
+ | Organization Name (eg, company) [Internet Widgits Pty Ltd]: | ||
+ | Organizational Unit Name (eg, section) []:. | ||
+ | Common Name (e.g. server FQDN or YOUR name) []: | ||
+ | Email Address []: | ||
+ | |||
+ | Please enter the following ' | ||
+ | to be sent with your certificate request | ||
+ | A challenge password []: | ||
+ | An optional company name []:. | ||
+ | ==> 0 | ||
+ | ==== | ||
+ | ==== | ||
+ | openssl ca -create_serial -out / | ||
+ | Using configuration from / | ||
+ | Enter pass phrase for / | ||
+ | Check that the request matches the signature | ||
+ | Signature ok | ||
+ | Certificate Details: | ||
+ | Serial Number: | ||
+ | 58: | ||
+ | Validity | ||
+ | Not Before: Apr 10 10:48:57 2023 GMT | ||
+ | Not After : Dec 31 10:48:57 2099 GMT | ||
+ | Subject: | ||
+ | countryName | ||
+ | stateOrProvinceName | ||
+ | organizationName | ||
+ | commonName | ||
+ | emailAddress | ||
+ | X509v3 extensions: | ||
+ | X509v3 Subject Key Identifier: | ||
+ | 07: | ||
+ | X509v3 Authority Key Identifier: | ||
+ | keyid: | ||
+ | |||
+ | X509v3 Basic Constraints: | ||
+ | CA:TRUE | ||
+ | Certificate is to be certified until Dec 31 10:48:57 2099 GMT (28403 days) | ||
+ | |||
+ | Write out database with 1 new entries | ||
+ | Data Base Updated | ||
+ | ==> 0 | ||
+ | ==== | ||
+ | CA certificate is in / | ||
+ | </ | ||
+ | |||
+ | Durch ausführen des Skriptes mit nachfolgendem Aufrufparameter ''/ | ||
+ | * ''/ | ||
+ | entstanden, deren Inhalt mit nachfolgendem Befehl bequem aufgelistet werden kann: | ||
+ | < | ||
+ | # ls -l /etc/ssl | ||
+ | total 64 | ||
+ | -rw-r--r-- 1 root root 4611 Apr 10 12:48 cacert.pem | ||
+ | -rw-r--r-- 1 root root 1078 Apr 10 12:48 careq.pem | ||
+ | lrwxrwxrwx 1 root root 46 Jun 3 2021 cert.pem -> ../ | ||
+ | drwxr-xr-x 1 root root 13526 Apr 16 09:30 certs | ||
+ | drwxr-xr-x 1 root root 0 Apr 10 12:47 crl | ||
+ | -rw-r--r-- 1 root root 3 Apr 10 12:47 crlnumber | ||
+ | -rw-r--r-- 1 root root 412 Dec 18 11:31 ct_log_list.cnf | ||
+ | -rw-r--r-- 1 root root 412 Dec 18 11:31 ct_log_list.cnf.dist | ||
+ | -rw-r--r-- 1 root root 166 Apr 10 12:48 index.txt | ||
+ | -rw-r--r-- 1 root root 21 Apr 10 12:48 index.txt.attr | ||
+ | -rw-r--r-- 1 root root 0 Apr 10 12:47 index.txt.old | ||
+ | drwxr-xr-x 1 root root 36 Apr 10 12:47 misc | ||
+ | drwxr-xr-x 1 root root 88 Apr 10 12:48 newcerts | ||
+ | -rw-r--r-- 1 root root 11160 Apr 10 12:46 openssl.cnf | ||
+ | -rw-r--r-- 1 root root 10909 Dec 18 11:31 openssl.cnf.dist | ||
+ | drwxr-xr-x 1 root root 18 Apr 10 12:47 private | ||
+ | -rw-r--r-- 1 root root 41 Apr 10 12:48 serial | ||
+ | </ | ||
+ | < | ||
+ | # ls -l / | ||
+ | total 8 | ||
+ | -rw-r--r-- 1 root root 4611 Apr 10 12:48 58B7F2C0F9308D484F77D3563D9DA99819E6A249.pem | ||
+ | </ | ||
+ | < | ||
+ | # ls -l / | ||
+ | total 4 | ||
+ | -rw------- 1 root root 1854 Apr 10 12:48 cakey.pem | ||
+ | </ | ||
+ | |||
+ | ==== Erstellen CSR (Certificate Request) ===== | ||
+ | |||
+ | Ebenfalls mit dem Script, welches schon bei der Erstellung einer eigene **Certificate Authority (CA)** genutzt wurde und sich unter ''/ | ||
+ | * einem **CSR (Certificate Request)** | ||
+ | * einem **private key (privaten Schlüssel)** | ||
+ | genutzt werden. | ||
+ | |||
+ | :!: **HINWEIS** - **Das zu erstellende Zertifikat hat __standardmässig__ eine Laufzeit von __1 Jahr__ !!!** | ||
+ | |||
+ | Falls eine längere Laufzeit als **ein Jahr** gewünscht sein soll, kann nachfolgender Parameter im Skript, in nachfolgendem Verzeichnis, | ||
+ | * **''/ | ||
+ | **angepasst** werden: | ||
+ | |||
+ | (**Nur relevanter Ausschnitt**) | ||
+ | <code ini> | ||
+ | ... | ||
+ | # Tachtler | ||
+ | # default: default_days = 365 # how long to certify for | ||
+ | default_days | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | :!: **HINWEIS** - **Nicht benötigte Angaben werden mit Eingabe eines Punktes [.] übersprungen**! | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ | <code perl> | ||
+ | # / | ||
+ | Use of uninitialized value $1 in concatenation (.) or string at / | ||
+ | ==== | ||
+ | openssl req -new -keyout newkey.pem -out newreq.pem -days 28023 -extensions=v3_req | ||
+ | Ignoring -days; not generating a certificate | ||
+ | Generating a RSA private key | ||
+ | ...+++++ | ||
+ | ....................................+++++ | ||
+ | writing new private key to ' | ||
+ | Enter PEM pass phrase: | ||
+ | Verifying - Enter PEM pass phrase: | ||
+ | ----- | ||
+ | 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 ' | ||
+ | ----- | ||
+ | Country Name (2 letter code) [AU]:DE | ||
+ | State or Province Name (full name) [Some-State]: | ||
+ | Locality Name (eg, city) []:Munich (Muenchen) | ||
+ | Organization Name (eg, company) [Internet Widgits Pty Ltd]: | ||
+ | Organizational Unit Name (eg, section) []:. | ||
+ | Common Name (e.g. server FQDN or YOUR name) []: | ||
+ | Email Address []: | ||
+ | |||
+ | Please enter the following ' | ||
+ | to be sent with your certificate request | ||
+ | A challenge password []: | ||
+ | An optional company name []:. | ||
+ | ==> 0 | ||
+ | ==== | ||
+ | Request is in newreq.pem, private key is in newkey.pem | ||
+ | </ | ||
+ | |||
+ | Durch ausführen des Scripts mit nachfolgendem Aufrufparameter ''/ | ||
+ | * ''/ | ||
+ | entstanden, welche mit nachfolgendem Befehl aufgelistet werden können: | ||
+ | < | ||
+ | # ls -l / | ||
+ | -rw------- 1 root root 1854 Apr 10 14:01 / | ||
+ | -rw-r--r-- 1 root root 1086 Apr 10 14:03 / | ||
+ | </ | ||
+ | |||
+ | :!: **WICHTIG** - Die so entstandene Datei ''/ | ||
+ | |||
+ | ==== Signieren CSR (Certificate Request) ==== | ||
+ | |||
+ | Um den in obigen Beispiel entstandenen **CSR (Certificate Request)** nun mit der **Certificate Authority (CA)** zu unterschreiben und somit ein **signiertes CRT (Certificate)** zu erzeugen, kann wieder das Script, welches schon bei der Erstellung der **Certificate Authority (CA)** genutzt wurde und sich unter ''/ | ||
+ | |||
+ | :!: **WICHTIG** - Das Passwort, ist das Passwort, welches im Schritt [[tachtler: | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ | <code perl> | ||
+ | # / | ||
+ | ==== | ||
+ | openssl ca -policy policy_anything -out newcert.pem -extensions=v3_req -infiles newreq.pem | ||
+ | Using configuration from / | ||
+ | Enter pass phrase for / | ||
+ | Check that the request matches the signature | ||
+ | Signature ok | ||
+ | Certificate Details: | ||
+ | Serial Number: | ||
+ | 58: | ||
+ | Validity | ||
+ | Not Before: Apr 10 12:04:22 2023 GMT | ||
+ | Not After : Dec 30 12:04:22 2099 GMT | ||
+ | Subject: | ||
+ | countryName | ||
+ | stateOrProvinceName | ||
+ | localityName | ||
+ | organizationName | ||
+ | commonName | ||
+ | emailAddress | ||
+ | X509v3 extensions: | ||
+ | X509v3 Basic Constraints: | ||
+ | CA:FALSE | ||
+ | X509v3 Key Usage: | ||
+ | Digital Signature, Non Repudiation, | ||
+ | X509v3 Subject Alternative Name: | ||
+ | DNS: | ||
+ | Certificate is to be certified until Dec 30 12:04:22 2099 GMT (28402 days) | ||
+ | Sign the certificate? | ||
+ | |||
+ | |||
+ | 1 out of 1 certificate requests certified, commit? [y/n]y | ||
+ | Write out database with 1 new entries | ||
+ | Data Base Updated | ||
+ | ==> 0 | ||
+ | ==== | ||
+ | Signed certificate is in newcert.pem | ||
+ | </ | ||
+ | |||
+ | Durch ausführen des Skriptes mit nachfolgendem Aufrufparameter ''/ | ||
+ | * ''/ | ||
+ | entstanden, welche mit nachfolgendem Befehl aufgelistet werden kann: | ||
+ | < | ||
+ | # ls -l / | ||
+ | -rw-r--r-- 1 root root 4639 Apr 10 14:04 / | ||
+ | -rw------- 1 root root 1854 Apr 10 14:01 / | ||
+ | -rw-r--r-- 1 root root 1086 Apr 10 14:03 / | ||
+ | </ | ||
+ | |||
+ | :!: **WICHTIG** - Die so entstandene Datei ''/ | ||
+ | |||
+ | ==== Entfernen des Passwortes vom private key ==== | ||
+ | |||
+ | Ein Problem ist durch die Erstellung der einzelnen Komponenten, | ||
+ | |||
+ | :!: **WICHTIG** - **Der //private key (privaten Schlüssel)// | ||
+ | |||
+ | Um dieses Problem zu lösen und das Passwort aus dem **private key (privaten Schlüssel)** zu entfernen, kann folgender Aufruf von '' | ||
+ | |||
+ | :!: **WICHTIG** - Das Passwort, ist das Passwort, welches im Schritt [[tachtler: | ||
+ | |||
+ | < | ||
+ | # openssl rsa < / | ||
+ | Enter pass phrase: | ||
+ | writing RSA key | ||
+ | </ | ||
+ | |||
+ | Durch ausführen des oben genannten Befehls ist eine weitere neue Dateien unter | ||
+ | * ''/ | ||
+ | entstanden, welche mit nachfolgendem Befehl aufgelistet werden kann: | ||
+ | < | ||
+ | # ls -l / | ||
+ | -rw-r--r-- 1 root root 1679 Apr 10 13:16 / | ||
+ | -rw------- 1 root root 1854 Apr 10 13:12 / | ||
+ | </ | ||
+ | |||
+ | :!: **WICHTIG** - Die so entstandene Datei ''/ | ||
+ | |||
+ | ==== Installation Zertifikat ==== | ||
+ | |||
+ | Nach dem ein Zertifikat wie hier: Graylog ArchLinux - TLS-Zertifikat erstellen beschrieben erstellt wurde, müssen die benötigen Komponenten noch an die entsprechenden Stellen im Betriebssystem kopiert werden. Dazu sind nachfolgende Befehle notwendig. | ||
+ | |||
+ | Bevor mit der abschliessenden Konfiguration von [[https:// | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | noch zu kopieren und ggf. umzubenennen und die **Besitz**- und **Datei**rechte der entsprechend Dateien noch anzupassen! | ||
+ | |||
+ | Als erstes werden mit den nachfolgenden Befehlen zwei neue Verzeichnisse im bestehen Verzeichnis ''/ | ||
+ | < | ||
+ | # mkdir -p / | ||
+ | </ | ||
+ | |||
+ | Anschliessend werden mit den nachfolgenden Befehlen die entsprechenden Dateien an den jeweiligen Bestimmungsort kopiert und ggf. umbenannt: | ||
+ | < | ||
+ | # cp -a / | ||
+ | # cp -a / | ||
+ | # cp -a / | ||
+ | </ | ||
+ | |||
+ | Die **Besitz**- und **Datei**rechte der soeben kopieren und ggf. umbenannten Dateien | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | können mit folgenden Befehlen die **Besitz**rechte wie folgt korrigiert werden: | ||
+ | < | ||
+ | # chown root:root / | ||
+ | # chown root:root / | ||
+ | # chown root:root / | ||
+ | </ | ||
+ | und mit folgenden Befehlen die **Datei**rechte: | ||
+ | < | ||
+ | # chmod 400 / | ||
+ | # chmod 444 / | ||
+ | # chmod 444 / | ||
+ | </ | ||
+ | |||
+ | Durch Ausführen der oben genannten Befehle sieht der Inhalt des Verzeichnisses | ||
+ | * ''/ | ||
+ | wie folgt aus, welches mit nachfolgendem Befehl aufgelistet werden kann: | ||
+ | < | ||
+ | # ls -l / | ||
+ | / | ||
+ | total 16 | ||
+ | -r--r--r-- 1 root root 4611 Apr 10 14:59 CAcert.pem | ||
+ | -r--r--r-- 1 root root 4810 Apr 10 14:59 graylog.idmz.tachtler.net.pem | ||
+ | |||
+ | / | ||
+ | total 4 | ||
+ | -r-------- 1 root root 1675 Apr 10 14:59 graylog.idmz.tachtler.net.key | ||
+ | </ | ||
+ | |||
+ | ===== systemd-journald -> graylog ===== | ||
+ | |||
+ | Zum Transport der in **'' | ||
+ | * **verschlüsselt** | ||
+ | * abgesichert durch **Zertifikate** | ||
+ | * **direkt** zu [[https:// | ||
+ | via transportiert werden. | ||
+ | |||
+ | ==== Elastic - beats - filebeat ==== | ||
+ | |||
+ | Die nachfolgende Methode unter Zuhilfenahme des [[https:// | ||
+ | |||
+ | Siehe auch nachfolgenden internen Link | ||
+ | * **[[tachtler: | ||
- | FIXME - :!: - **Hier geht es weiter.../ To be continued...** |
tachtler/graylog_archlinux.1643463554.txt.gz · Zuletzt geändert: 2022/01/29 14:39 von klaus