Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| centos:web_c7:graylog2 [17.02.2017 12:12. ] – [graylog v2 - WEB-GUI] django | centos:web_c7:graylog2 [22.07.2019 14:42. ] (aktuell) – django | ||
|---|---|---|---|
| Zeile 64: | Zeile 64: | ||
| sub 2048R/ | sub 2048R/ | ||
| - | Diesen **Key fingerprint = 4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4** vergleichen wir nun mit den Angaben auf der [[https:// | + | Diesen **Key fingerprint = 4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4** vergleichen wir nun mit den Angaben auf der [[https:// |
| # rpm --import / | # rpm --import / | ||
| Zeile 70: | Zeile 70: | ||
| Graylog selbst werden wir später aus dem Repository von **graylog** installieren. So bleibt zum einen der Konfigurationsaufwand überschaubar und wir werden mit Updates versorgt, wenn Änderungen und/oder Erweiterungen am Programmcode von graylog notwendig werden. | Graylog selbst werden wir später aus dem Repository von **graylog** installieren. So bleibt zum einen der Konfigurationsaufwand überschaubar und wir werden mit Updates versorgt, wenn Änderungen und/oder Erweiterungen am Programmcode von graylog notwendig werden. | ||
| Die Integration des benötigten Repositories erfolgt direkt mit nachfolgendem Befehl: | Die Integration des benötigten Repositories erfolgt direkt mit nachfolgendem Befehl: | ||
| - | # yum localinstall https:// | + | # yum localinstall https:// |
| - | Anschließend | + | Anschliessend |
| # vim / | # vim / | ||
| <file bash / | <file bash / | ||
| name=graylog | name=graylog | ||
| - | baseurl=https:// | + | baseurl=https:// |
| gpgcheck=1 | gpgcheck=1 | ||
| gpgkey=file:/// | gpgkey=file:/// | ||
| Zeile 249: | Zeile 249: | ||
| Im nächsten Schritt installieren wir nun noch elasticsearch als Suchmaschine/ | Im nächsten Schritt installieren wir nun noch elasticsearch als Suchmaschine/ | ||
| # yum install elasticsearch -y | # yum install elasticsearch -y | ||
| - | |||
| - | Bei der Installation des RPMs werden unter anderem folgende Informationen angegeben: | ||
| - | < | ||
| - | |||
| - | Running transaction check | ||
| - | Running transaction test | ||
| - | Transaction test succeeded | ||
| - | Running transaction | ||
| - | Creating elasticsearch group... OK | ||
| - | Creating elasticsearch user... OK | ||
| - | Installing : elasticsearch-2.4.4-1.noarch | ||
| - | ### NOT starting on installation, | ||
| - | sudo systemctl daemon-reload | ||
| - | sudo systemctl enable elasticsearch.service | ||
| - | ### You can start elasticsearch service by executing | ||
| - | sudo systemctl start elasticsearch.service | ||
| - | Verifying | ||
| - | |||
| - | Installed: | ||
| - | elasticsearch.noarch 0: | ||
| - | </ | ||
| - | |||
| - | Bei dr späteren Konfiguration werden wir diese Schritte dann nachholen. | ||
| Wollen wir wissen, welche Dateien und Verzeichnisse das Paket auf unseren Server packte, benutzen wir folgenden Befehl. | Wollen wir wissen, welche Dateien und Verzeichnisse das Paket auf unseren Server packte, benutzen wir folgenden Befehl. | ||
| Zeile 370: | Zeile 347: | ||
| / | / | ||
| / | / | ||
| + | |||
| ==== graylog ==== | ==== graylog ==== | ||
| Zu guter letzt installieren wir nun noch Pakete **graylog** sowie das Zusatzprogramm **pwgen** zum Generieren von Passwörtern, | Zu guter letzt installieren wir nun noch Pakete **graylog** sowie das Zusatzprogramm **pwgen** zum Generieren von Passwörtern, | ||
| Zeile 378: | Zeile 356: | ||
| # rpm -qil graylog-server | # rpm -qil graylog-server | ||
| < | < | ||
| - | Version | + | Version |
| - | Release | + | Release |
| Architecture: | Architecture: | ||
| - | Install Date: Wed 15 Feb 2017 04:21:21 PM CET | + | Install Date: Wed 27 Sep 2017 11:26:28 AM CEST |
| Group : optional | Group : optional | ||
| - | Size : 106769271 | + | Size : 110416070 |
| License | License | ||
| - | Signature | + | Signature |
| - | Source RPM : graylog-server-2.2.0-11.src.rpm | + | Source RPM : graylog-server-2.3.1-1.src.rpm |
| - | Build Date : Thu 09 Feb 2017 12:42:54 PM CET | + | Build Date : Fri 25 Aug 2017 03:57:17 PM CEST |
| - | Build Host : f89729f86e48 | + | Build Host : 5ee9456006b4 |
| Relocations : / | Relocations : / | ||
| Packager | Packager | ||
| Zeile 407: | Zeile 385: | ||
| / | / | ||
| / | / | ||
| - | / | + | / |
| - | / | + | / |
| - | / | + | / |
| - | / | + | / |
| - | / | + | / |
| - | / | + | / |
| Zeile 473: | Zeile 451: | ||
| </ | </ | ||
| - | Der erfolgreiche Start des Servers wird auch in dessen Logdatei protokolliert. | + | Der erfolgreiche Start des Servers wird auch in dessen Logdatei protokolliert. |
| # less / | # less / | ||
| Zeile 603: | Zeile 581: | ||
| Created symlink from / | Created symlink from / | ||
| - | |||
| - | |||
| === automatischer Start des Daemon === | === automatischer Start des Daemon === | ||
| Zeile 738: | Zeile 714: | ||
| Geben wir ein falsches Passwort ein, wird natürlich der Zugang verwehrt. | Geben wir ein falsches Passwort ein, wird natürlich der Zugang verwehrt. | ||
| - | # mongo -u " | + | # mongo -u " |
| MongoDB shell version: 2.6.12 | MongoDB shell version: 2.6.12 | ||
| Zeile 1369: | Zeile 1345: | ||
| Anschließend informieren wir den **systemd** über unser " | Anschließend informieren wir den **systemd** über unser " | ||
| | | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| === Start des Daemon === | === Start des Daemon === | ||
| Zeile 2213: | Zeile 2183: | ||
| - | === Apache Reverse-Proxy === | ||
| Da der **graylog-web**-Daemon __ohne__ Root-Rechte gestartet wird, können wir nur unprivilegierte Ports (Ports größer als 1024) definieren. Da wir aber die Graylog-Web-GUI auch von außen, über einen TLS geschützten Transportkanal ansprechen wollen, nutzen wir einen Apache-vHOST als Reverse-Proxy. | Da der **graylog-web**-Daemon __ohne__ Root-Rechte gestartet wird, können wir nur unprivilegierte Ports (Ports größer als 1024) definieren. Da wir aber die Graylog-Web-GUI auch von außen, über einen TLS geschützten Transportkanal ansprechen wollen, nutzen wir einen Apache-vHOST als Reverse-Proxy. | ||
| Zeile 2359: | Zeile 2328: | ||
| - | === Start des Daemon === | ||
| - | Nun ist es an der Zeit den die Web-GUI **graylog-web** zu starten. | ||
| - | # systemctl start graylog-web.service | ||
| - | |||
| - | Den Serverstatus können wir wie folgt abfragen. | ||
| - | # systemctl status graylog-web.service | ||
| - | |||
| - | < | ||
| - | <font style=" | ||
| - | | ||
| - | | ||
| - | Docs: http:// | ||
| - | Main PID: 8767 (graylog-web) | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | Dec 28 15:21:52 vml000117.dmz.nausch.org systemd[1]: Started Graylog web interface. | ||
| - | Dec 28 15:21:52 vml000117.dmz.nausch.org systemd[1]: Starting Graylog web interface... | ||
| - | Dec 28 15:21:53 vml000117.dmz.nausch.org graylog-web[8767]: | ||
| - | </ | ||
| - | |||
| - | Der erfolgreiche Start des Servers wird auch in dessen Logdatei protokolliert. | ||
| - | # / | ||
| - | |||
| - | < | ||
| - | Application started (Prod) | ||
| - | |||
| - | 2015-12-28T15: | ||
| - | Listening for HTTP on / | ||
| - | |||
| - | === automatischer Start des Daemon === | ||
| - | Damit der Daemon beim Hochfahren unseres Servers automatisch gestartet wird, nutzen wir folgenden Befehl. | ||
| - | # systemctl enable graylog-web.service | ||
| - | |||
| - | Created symlink from / | ||
| - | |||
| - | Wollen wir wissen, ob die Autostartfunktion bereits gesetzt ist, verwenden wir diesen Aufruf. | ||
| - | # systemctl is-enabled graylog-web.service | ||
| - | |||
| - | enabled | ||
| ==== Paketfilter/ | ==== Paketfilter/ | ||
| - | === graylog-web === | + | === graylog |
| Unter **CentOS 7** wird als Standard-Firewall die dynamische **firewalld** verwendet. Ein großer Vorteil der dynamischen Paketfilterregeln ist unter anderem, dass zur Aktivierung der neuen Firewall-Regel(n) nicht der Daemon durchgestartet werden muss und somit alle aktiven Verbindungen kurz getrennt werden. Sondern unsere Änderungen können **// | Unter **CentOS 7** wird als Standard-Firewall die dynamische **firewalld** verwendet. Ein großer Vorteil der dynamischen Paketfilterregeln ist unter anderem, dass zur Aktivierung der neuen Firewall-Regel(n) nicht der Daemon durchgestartet werden muss und somit alle aktiven Verbindungen kurz getrennt werden. Sondern unsere Änderungen können **// | ||
| Zeile 2428: | Zeile 2356: | ||
| # ps aux | grep graylog-server | # ps aux | grep graylog-server | ||
| - | <code bash> | + | <code bash> |
| - | graylog | + | graylog |
| + | root 3965 0.0 0.0 112648 | ||
| Somit können wir keine bei der Definition von **[[https:// | Somit können wir keine bei der Definition von **[[https:// | ||
| Zeile 2463: | Zeile 2392: | ||
| Nachdem wir unseren graylog-Server erfolgreich vorbereitet haben, werden wir nun unsere Linux-Hosts so konfigurieren, | Nachdem wir unseren graylog-Server erfolgreich vorbereitet haben, werden wir nun unsere Linux-Hosts so konfigurieren, | ||
| - | Das Weiterleiten der Syslogmeldungen ist nicht sonderlich schwer zu konfigurieren. Das Wichtigste das es zu beachten gibt, ist, dass die Meldungen | + | Das Weiterleiten der Syslogmeldungen ist nicht sonderlich schwer zu konfigurieren. Das Wichtigste das es zu beachten gibt, ist, dass die Meldungen |
| ==== UDP ==== | ==== UDP ==== | ||
| Zeile 2486: | Zeile 2415: | ||
| #*.* @@remote-host: | #*.* @@remote-host: | ||
| # | # | ||
| - | # Django : 2015-06-12 | + | # Django : 2017-02-14 |
| $template GRAYLOGRFC5424,"< | $template GRAYLOGRFC5424,"< | ||
| - | *.* @10.0.0.117: | + | *.* @10.0.0.117: |
| # | # | ||
| # ### end of the forwarding rule ###</ | # ### end of the forwarding rule ###</ | ||
| Zeile 2516: | Zeile 2445: | ||
| #*.* @@remote-host: | #*.* @@remote-host: | ||
| # | # | ||
| - | # Django : 2015-06-12 | + | # Django : 2017-02-14 |
| $template GRAYLOGRFC5424,"< | $template GRAYLOGRFC5424,"< | ||
| - | *.* @@10.0.0.117: | + | *.* @@10.0.0.117: |
| # | # | ||
| # ### end of the forwarding rule ###</ | # ### end of the forwarding rule ###</ | ||
| Zeile 2687: | Zeile 2616: | ||
| -rw-r--r--. 1 root root 3 Jan 3 19:40 serial</ | -rw-r--r--. 1 root root 3 Jan 3 19:40 serial</ | ||
| + | < | ||
| + | ├── certs | ||
| + | ├── crl | ||
| + | ├── csrs | ||
| + | ├── index.txt | ||
| + | ├── newcerts | ||
| + | ├── private | ||
| + | └── serial</ | ||
| + | |||
| + | Die CA-Konfigurationsdatei passen wir noch unseren Wünschen entsprechend an. | ||
| + | # vim / | ||
| + | |||
| + | <file bash / | ||
| + | # OpenSSL example configuration file. | ||
| + | # This is mostly being used for generation of certificate requests. | ||
| + | # | ||
| + | |||
| + | # This definition stops the following lines choking if HOME isn't | ||
| + | # defined. | ||
| + | HOME = . | ||
| + | RANDFILE = $ENV:: | ||
| + | |||
| + | # Extra OBJECT IDENTIFIER info: | ||
| + | # | ||
| + | oid_section = new_oids | ||
| + | |||
| + | # To use this configuration file with the " | ||
| + | # " | ||
| + | # X.509v3 extensions to use: | ||
| + | # extensions = | ||
| + | # (Alternatively, | ||
| + | # X.509v3 extensions in its main [= default] section.) | ||
| + | |||
| + | [ new_oids ] | ||
| + | |||
| + | # We can add new OIDs in here for use by ' | ||
| + | # Add a simple OID like this: | ||
| + | # testoid1=1.2.3.4 | ||
| + | # Or use config file substitution like this: | ||
| + | # testoid2=${testoid1}.5.6 | ||
| + | |||
| + | # Policies used by the TSA examples. | ||
| + | tsa_policy1 = 1.2.3.4.1 | ||
| + | tsa_policy2 = 1.2.3.4.5.6 | ||
| + | tsa_policy3 = 1.2.3.4.5.7 | ||
| + | |||
| + | #################################################################### | ||
| + | [ ca ] | ||
| + | default_ca = CA_default # | ||
| + | |||
| + | #################################################################### | ||
| + | [ CA_default ] | ||
| + | |||
| + | dir = / | ||
| + | certs = $dir/ | ||
| + | crl_dir = $dir/crl # Where the issued crl are kept | ||
| + | database = $dir/ | ||
| + | # | ||
| + | # several ctificates with same subject. | ||
| + | new_certs_dir = $dir/ | ||
| + | |||
| + | # Django : 2017-02-14 | ||
| + | # default: certificate | ||
| + | certificate | ||
| + | serial = $dir/serial # The current serial number | ||
| + | crlnumber = $dir/ | ||
| + | # must be commented out to leave a V1 CRL | ||
| + | crl = $dir/ | ||
| + | # Django : 2017-02-14 | ||
| + | # default: private_key = $dir/ | ||
| + | private_key = $dir/ | ||
| + | RANDFILE = $dir/ | ||
| + | |||
| + | x509_extensions = usr_cert # The extentions to add to the cert | ||
| + | |||
| + | # Comment out the following two lines for the " | ||
| + | # (and highly broken) format. | ||
| + | name_opt = ca_default # | ||
| + | cert_opt = ca_default # | ||
| + | |||
| + | # Extension copying option: use with caution. | ||
| + | # copy_extensions = copy | ||
| + | |||
| + | # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs | ||
| + | # so this is commented out by default to leave a V1 CRL. | ||
| + | # crlnumber must also be commented out to leave a V1 CRL. | ||
| + | # crl_extensions = crl_ext | ||
| + | |||
| + | default_days = 365 # how long to certify for | ||
| + | default_crl_days= 30 # how long before next CRL | ||
| + | default_md = sha256 # use SHA-256 by default | ||
| + | preserve = no # keep passed DN ordering | ||
| + | |||
| + | # A few difference way of specifying how similar the request should look | ||
| + | # For type CA, the listed attributes must be the same, and the optional | ||
| + | # and supplied fields are just that :-) | ||
| + | policy = policy_match | ||
| + | |||
| + | # For the CA policy | ||
| + | [ policy_match ] | ||
| + | countryName = match | ||
| + | stateOrProvinceName = match | ||
| + | organizationName = match | ||
| + | organizationalUnitName = optional | ||
| + | commonName = supplied | ||
| + | emailAddress = optional | ||
| + | |||
| + | # For the ' | ||
| + | # At this point in time, you must list all acceptable ' | ||
| + | # types. | ||
| + | [ policy_anything ] | ||
| + | countryName = optional | ||
| + | stateOrProvinceName = optional | ||
| + | localityName = optional | ||
| + | organizationName = optional | ||
| + | organizationalUnitName = optional | ||
| + | commonName = supplied | ||
| + | emailAddress = optional | ||
| + | |||
| + | #################################################################### | ||
| + | [ req ] | ||
| + | default_bits = 2048 | ||
| + | default_md = sha256 | ||
| + | default_keyfile = privkey.pem | ||
| + | distinguished_name = req_distinguished_name | ||
| + | attributes = req_attributes | ||
| + | x509_extensions = v3_ca # The extentions to add to the self signed cert | ||
| + | |||
| + | # Passwords for private keys if not present they will be prompted for | ||
| + | # input_password = secret | ||
| + | # output_password = secret | ||
| + | |||
| + | # This sets a mask for permitted string types. There are several options. | ||
| + | # default: PrintableString, | ||
| + | # pkix : PrintableString, | ||
| + | # utf8only: only UTF8Strings (PKIX recommendation after 2004). | ||
| + | # nombstr : PrintableString, | ||
| + | # MASK:XXXX a literal mask value. | ||
| + | # WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings. | ||
| + | string_mask = utf8only | ||
| + | |||
| + | # req_extensions = v3_req # The extensions to add to a certificate request | ||
| + | |||
| + | [ req_distinguished_name ] | ||
| + | countryName = Country Name (2 letter code) | ||
| + | countryName_default = XX | ||
| + | countryName_min = 2 | ||
| + | countryName_max = 2 | ||
| + | |||
| + | stateOrProvinceName = State or Province Name (full name) | ||
| + | # | ||
| + | |||
| + | localityName = Locality Name (eg, city) | ||
| + | localityName_default = Default City | ||
| + | |||
| + | 0.organizationName = Organization Name (eg, company) | ||
| + | 0.organizationName_default = Default Company Ltd | ||
| + | |||
| + | # we can do this but it is not needed normally :-) | ||
| + | # | ||
| + | # | ||
| + | |||
| + | organizationalUnitName = Organizational Unit Name (eg, section) | ||
| + | # | ||
| + | |||
| + | commonName = Common Name (eg, your name or your server\' | ||
| + | commonName_max = 64 | ||
| + | |||
| + | emailAddress = Email Address | ||
| + | emailAddress_max = 64 | ||
| + | |||
| + | # SET-ex3 = SET extension number 3 | ||
| + | |||
| + | [ req_attributes ] | ||
| + | challengePassword = A challenge password | ||
| + | challengePassword_min = 4 | ||
| + | challengePassword_max = 20 | ||
| + | |||
| + | unstructuredName = An optional company name | ||
| + | |||
| + | [ usr_cert ] | ||
| + | |||
| + | # These extensions are added when ' | ||
| + | |||
| + | # This goes against PKIX guidelines but some CAs do it and some software | ||
| + | # requires this to avoid interpreting an end user certificate as a CA. | ||
| + | |||
| + | basicConstraints=CA: | ||
| + | |||
| + | # Here are some examples of the usage of nsCertType. If it is omitted | ||
| + | # the certificate can be used for anything *except* object signing. | ||
| + | |||
| + | # This is OK for an SSL server. | ||
| + | # nsCertType = server | ||
| + | |||
| + | # For an object signing certificate this would be used. | ||
| + | # nsCertType = objsign | ||
| + | |||
| + | # For normal client use this is typical | ||
| + | # nsCertType = client, email | ||
| + | |||
| + | # and for everything including object signing: | ||
| + | # nsCertType = client, email, objsign | ||
| + | |||
| + | # This is typical in keyUsage for a client certificate. | ||
| + | # keyUsage = nonRepudiation, | ||
| + | |||
| + | # This will be displayed in Netscape' | ||
| + | nsComment = " | ||
| + | |||
| + | # PKIX recommendations harmless if included in all certificates. | ||
| + | subjectKeyIdentifier=hash | ||
| + | authorityKeyIdentifier=keyid, | ||
| + | |||
| + | # This stuff is for subjectAltName and issuerAltname. | ||
| + | # Import the email address. | ||
| + | # subjectAltName=email: | ||
| + | # An alternative to produce certificates that aren't | ||
| + | # deprecated according to PKIX. | ||
| + | # subjectAltName=email: | ||
| + | |||
| + | # Copy subject details | ||
| + | # issuerAltName=issuer: | ||
| + | |||
| + | # | ||
| + | #nsBaseUrl | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # This is required for TSA certificates. | ||
| + | # extendedKeyUsage = critical, | ||
| + | |||
| + | [ v3_req ] | ||
| + | |||
| + | # Extensions to add to a certificate request | ||
| + | |||
| + | basicConstraints = CA:FALSE | ||
| + | keyUsage = nonRepudiation, | ||
| + | |||
| + | [ v3_ca ] | ||
| + | |||
| + | |||
| + | # Extensions for a typical CA | ||
| + | |||
| + | |||
| + | # PKIX recommendation. | ||
| + | |||
| + | subjectKeyIdentifier=hash | ||
| + | |||
| + | authorityKeyIdentifier=keyid: | ||
| + | |||
| + | # This is what PKIX recommends but some broken software chokes on critical | ||
| + | # extensions. | ||
| + | # | ||
| + | # So we do this instead. | ||
| + | basicConstraints = CA:true | ||
| + | |||
| + | # Key usage: this is typical for a CA certificate. However since it will | ||
| + | # prevent it being used as an test self-signed certificate it is best | ||
| + | # left out by default. | ||
| + | # keyUsage = cRLSign, keyCertSign | ||
| + | |||
| + | # Some might want this also | ||
| + | # nsCertType = sslCA, emailCA | ||
| + | |||
| + | # Include email address in subject alt name: another PKIX recommendation | ||
| + | # subjectAltName=email: | ||
| + | # Copy issuer details | ||
| + | # issuerAltName=issuer: | ||
| + | |||
| + | # DER hex encoding of an extension: beware experts only! | ||
| + | # obj=DER: | ||
| + | # Where ' | ||
| + | # You can even override a supported extension: | ||
| + | # basicConstraints= critical, DER: | ||
| + | |||
| + | [ crl_ext ] | ||
| + | |||
| + | # CRL extensions. | ||
| + | # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. | ||
| + | |||
| + | # issuerAltName=issuer: | ||
| + | authorityKeyIdentifier=keyid: | ||
| + | |||
| + | [ proxy_cert_ext ] | ||
| + | # These extensions should be added when creating a proxy certificate | ||
| + | |||
| + | # This goes against PKIX guidelines but some CAs do it and some software | ||
| + | # requires this to avoid interpreting an end user certificate as a CA. | ||
| + | |||
| + | basicConstraints=CA: | ||
| + | |||
| + | # Here are some examples of the usage of nsCertType. If it is omitted | ||
| + | # the certificate can be used for anything *except* object signing. | ||
| + | |||
| + | # This is OK for an SSL server. | ||
| + | # nsCertType = server | ||
| + | |||
| + | # For an object signing certificate this would be used. | ||
| + | # nsCertType = objsign | ||
| + | |||
| + | # For normal client use this is typical | ||
| + | # nsCertType = client, email | ||
| + | |||
| + | # and for everything including object signing: | ||
| + | # nsCertType = client, email, objsign | ||
| + | |||
| + | # This is typical in keyUsage for a client certificate. | ||
| + | # keyUsage = nonRepudiation, | ||
| + | |||
| + | # This will be displayed in Netscape' | ||
| + | nsComment = " | ||
| + | |||
| + | # PKIX recommendations harmless if included in all certificates. | ||
| + | subjectKeyIdentifier=hash | ||
| + | authorityKeyIdentifier=keyid, | ||
| + | |||
| + | # This stuff is for subjectAltName and issuerAltname. | ||
| + | # Import the email address. | ||
| + | # subjectAltName=email: | ||
| + | # An alternative to produce certificates that aren't | ||
| + | # deprecated according to PKIX. | ||
| + | # subjectAltName=email: | ||
| + | |||
| + | # Copy subject details | ||
| + | # issuerAltName=issuer: | ||
| + | |||
| + | # | ||
| + | #nsBaseUrl | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # This really needs to be in place for it to be a proxy certificate. | ||
| + | proxyCertInfo=critical, | ||
| + | |||
| + | #################################################################### | ||
| + | [ tsa ] | ||
| + | |||
| + | default_tsa = tsa_config1 # | ||
| + | |||
| + | [ tsa_config1 ] | ||
| + | |||
| + | # These are used by the TSA reply generation only. | ||
| + | dir = ./demoCA # TSA root directory | ||
| + | serial = $dir/ | ||
| + | crypto_device = builtin # OpenSSL engine to use for signing | ||
| + | signer_cert = $dir/ | ||
| + | # (optional) | ||
| + | certs = $dir/ | ||
| + | # (optional) | ||
| + | signer_key = $dir/ | ||
| + | |||
| + | default_policy = tsa_policy1 # | ||
| + | # (optional) | ||
| + | other_policies = tsa_policy2, | ||
| + | digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory) | ||
| + | accuracy = secs:1, millisecs: | ||
| + | clock_precision_digits | ||
| + | ordering = yes # Is ordering defined for timestamps? | ||
| + | # (optional, default: no) | ||
| + | tsa_name = yes # Must the TSA name be included in the reply? | ||
| + | # (optional, default: no) | ||
| + | ess_cert_id_chain = no # Must the ESS cert id chain be included? | ||
| + | # (optional, default: no)</ | ||
| === privaten Schlüssel und selbstsigniertes Root CA Zertifikat erstellen === | === privaten Schlüssel und selbstsigniertes Root CA Zertifikat erstellen === | ||
| Als erstes werden wir uns nun den privaten Schlüssel unserer Root CA generieren, in zugehöriges Zertifikat erzeugen und dieses mit dem privaten Schlüssel der CA unterschreiben; | Als erstes werden wir uns nun den privaten Schlüssel unserer Root CA generieren, in zugehöriges Zertifikat erzeugen und dieses mit dem privaten Schlüssel der CA unterschreiben; | ||
| Zeile 2718: | Zeile 3015: | ||
| <font style=" | <font style=" | ||
| </ | </ | ||
| + | |||
| + | Sowohl Zertifikat und der Schlüssel des gerade erzeugten Root Zertifikates liegen nun in unserem CA-Systemverzeichnis. | ||
| + | < | ||
| + | ├── certs | ||
| + | │ └── root-ca.certifikate.pem | ||
| + | ├── crl | ||
| + | ├── csrs | ||
| + | ├── index.txt | ||
| + | ├── newcerts | ||
| + | ├── private | ||
| + | │ └── root-ca.key.pem | ||
| + | └── serial</ | ||
| === privaten Schlüssel der Root CA schützen === | === privaten Schlüssel der Root CA schützen === | ||
| Zeile 2943: | Zeile 3252: | ||
| < | < | ||
| <font style=" | <font style=" | ||
| - | -inform pem -out / | + | -inform pem -out / |
| + | | ||
| </ | </ | ||
| Zeile 3145: | Zeile 3455: | ||
| </ | </ | ||
| - | === erstellte Zertifikat dem gralog-server zur Verfügung stellen === | + | === erstellte Zertifikat dem graylog-server zur Verfügung stellen === |
| Als letzten Schritt stellen wir nun das gerade erzeugte Server-Zertifikat dem graylog-server zur Verfügung. Hierzu kopieren wir einfach das gerade generierte Zertifikat an Ort und Stelle. | Als letzten Schritt stellen wir nun das gerade erzeugte Server-Zertifikat dem graylog-server zur Verfügung. Hierzu kopieren wir einfach das gerade generierte Zertifikat an Ort und Stelle. | ||
| # cp / | # cp / | ||
| Zeile 3640: | Zeile 3950: | ||
| kY+Z9s9+By5IVw== | kY+Z9s9+By5IVw== | ||
| -----END CERTIFICATE-----</ | -----END CERTIFICATE-----</ | ||
| + | |||
| === erstellte Zertifikat dem rsyslog-Daemon auf dem Clientrechner zur Verfügung stellen === | === erstellte Zertifikat dem rsyslog-Daemon auf dem Clientrechner zur Verfügung stellen === | ||
| - | Als letzten Schritt stellen wir nun das gerade erzeugte Server-Zertifikat dem graylog-server | + | Als letzten Schritt stellen wir nun das gerade erzeugte Server-Zertifikat dem rsyslog-Daemon auf dem Client-Rechner |
| # vim / | # vim / | ||
| Zeile 3682: | Zeile 3993: | ||
| kY+Z9s9+By5IVw== | kY+Z9s9+By5IVw== | ||
| -----END CERTIFICATE-----</ | -----END CERTIFICATE-----</ | ||
| + | |||
| + | === Ein Zertifikat revoken === | ||
| + | Will man ein ausgestelltes Zertifikat zurückziehen (revoken) nutzen wir ebenfalls das Programm **openssl**. | ||
| + | # openssl ca -revoke / | ||
| + | |||
| + | Using configuration from / | ||
| + | Enter pass phrase for / | ||
| + | Revoking Certificate 02. | ||
| + | Data Base Updated | ||
| + | |||
| ===== Konfiguration graylog-server ===== | ===== Konfiguration graylog-server ===== | ||
| Zeile 3828: | Zeile 4149: | ||
| # The imjournal module bellow is now used as a message source instead of imuxsock. | # The imjournal module bellow is now used as a message source instead of imuxsock. | ||
| $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) | $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) | ||
| - | $ModLoad imjournal # provides access to the systemd journal | + | # Django : 2017-09-26 |
| + | # default: | ||
| #$ModLoad imklog # reads kernel messages (the same are read from journald) | #$ModLoad imklog # reads kernel messages (the same are read from journald) | ||
| #$ModLoad immark | #$ModLoad immark | ||
| Zeile 3858: | Zeile 4180: | ||
| # Turn off message reception via local log socket; | # Turn off message reception via local log socket; | ||
| # local messages are retrieved through imjournal now. | # local messages are retrieved through imjournal now. | ||
| - | $OmitLocalLogging on | + | # Django : 2017-09-26 |
| + | # default: | ||
| # File to store the position in the journal | # File to store the position in the journal | ||
| - | $IMJournalStateFile imjournal.state | + | # Django : 2017-09-26 |
| + | # default: | ||
| # Django : 2016-01-03 - certificate files for TLS | # Django : 2016-01-03 - certificate files for TLS | ||
| Zeile 3928: | Zeile 4252: | ||
| # Django : 2016-01-03 | # Django : 2016-01-03 | ||
| $template GRAYLOGRFC5424,"< | $template GRAYLOGRFC5424,"< | ||
| - | *.* @@10.0.0.117: | + | *.* @@10.0.0.117: |
| # | # | ||
| # ### end of the forwarding rule ###</ | # ### end of the forwarding rule ###</ | ||
| Zeile 3948: | Zeile 4272: | ||
| Alles in allem können wir feststellen, | Alles in allem können wir feststellen, | ||
| + | |||
| + | ==== Zertifikatsgenerierung und Clientkonfiguration ==== | ||
| + | ==== Zertifikatserstellung optimieren ==== | ||
| + | Um nun bei der Generierung der Zertifikats-Requests und der Erstellung der zugehörigen Zertifikate nicht jedesmal die benötigten Angaben erneut eintippen zu müssen werden wir nun die wiederkehrenden Informationen in der Konfigurationsdatei // | ||
| + | # vim / | ||
| + | |||
| + | <file bash / | ||
| + | # OpenSSL example configuration file. | ||
| + | # This is mostly being used for generation of certificate requests. | ||
| + | # | ||
| + | |||
| + | # This definition stops the following lines choking if HOME isn't | ||
| + | # defined. | ||
| + | HOME = . | ||
| + | RANDFILE = $ENV:: | ||
| + | |||
| + | # Extra OBJECT IDENTIFIER info: | ||
| + | # | ||
| + | oid_section = new_oids | ||
| + | |||
| + | # To use this configuration file with the " | ||
| + | # " | ||
| + | # X.509v3 extensions to use: | ||
| + | # extensions = | ||
| + | # (Alternatively, | ||
| + | # X.509v3 extensions in its main [= default] section.) | ||
| + | |||
| + | [ new_oids ] | ||
| + | |||
| + | # We can add new OIDs in here for use by ' | ||
| + | # Add a simple OID like this: | ||
| + | # testoid1=1.2.3.4 | ||
| + | # Or use config file substitution like this: | ||
| + | # testoid2=${testoid1}.5.6 | ||
| + | |||
| + | # Policies used by the TSA examples. | ||
| + | tsa_policy1 = 1.2.3.4.1 | ||
| + | tsa_policy2 = 1.2.3.4.5.6 | ||
| + | tsa_policy3 = 1.2.3.4.5.7 | ||
| + | |||
| + | #################################################################### | ||
| + | [ ca ] | ||
| + | default_ca = CA_default # | ||
| + | |||
| + | #################################################################### | ||
| + | [ CA_default ] | ||
| + | |||
| + | dir = / | ||
| + | certs = $dir/ | ||
| + | crl_dir = $dir/crl # Where the issued crl are kept | ||
| + | database = $dir/ | ||
| + | # | ||
| + | # several ctificates with same subject. | ||
| + | new_certs_dir = $dir/ | ||
| + | |||
| + | # Django : 2017-02-14 | ||
| + | # default: certificate = $dir/ | ||
| + | certificate = $dir/ | ||
| + | serial = $dir/serial # The current serial number | ||
| + | crlnumber = $dir/ | ||
| + | # must be commented out to leave a V1 CRL | ||
| + | crl = $dir/ | ||
| + | # Django : 2017-02-14 | ||
| + | # default: private_key = $dir/ | ||
| + | private_key = $dir/ | ||
| + | RANDFILE = $dir/ | ||
| + | |||
| + | x509_extensions = usr_cert # The extentions to add to the cert | ||
| + | |||
| + | # Comment out the following two lines for the " | ||
| + | # (and highly broken) format. | ||
| + | name_opt = ca_default # | ||
| + | cert_opt = ca_default # | ||
| + | |||
| + | # Extension copying option: use with caution. | ||
| + | # copy_extensions = copy | ||
| + | |||
| + | # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs | ||
| + | # so this is commented out by default to leave a V1 CRL. | ||
| + | # crlnumber must also be commented out to leave a V1 CRL. | ||
| + | # crl_extensions = crl_ext | ||
| + | |||
| + | # Django : 2017-02-14 | ||
| + | # default: default_days = 365 # how long to certify for | ||
| + | default_days = 10950 | ||
| + | default_crl_days= 30 # how long before next CRL | ||
| + | default_md = sha256 # use SHA-256 by default | ||
| + | preserve = no # keep passed DN ordering | ||
| + | |||
| + | # A few difference way of specifying how similar the request should look | ||
| + | # For type CA, the listed attributes must be the same, and the optional | ||
| + | # and supplied fields are just that :-) | ||
| + | policy = policy_match | ||
| + | |||
| + | # For the CA policy | ||
| + | [ policy_match ] | ||
| + | countryName = match | ||
| + | stateOrProvinceName = match | ||
| + | organizationName = match | ||
| + | organizationalUnitName = optional | ||
| + | commonName = supplied | ||
| + | emailAddress = optional | ||
| + | |||
| + | # For the ' | ||
| + | # At this point in time, you must list all acceptable ' | ||
| + | # types. | ||
| + | [ policy_anything ] | ||
| + | countryName = optional | ||
| + | stateOrProvinceName = optional | ||
| + | localityName = optional | ||
| + | organizationName = optional | ||
| + | organizationalUnitName = optional | ||
| + | commonName = supplied | ||
| + | emailAddress = optional | ||
| + | |||
| + | #################################################################### | ||
| + | [ req ] | ||
| + | # Django : 2017-02-14 | ||
| + | # default: default_bits = 2048 | ||
| + | default_bits = 4096 | ||
| + | default_md = sha256 | ||
| + | default_keyfile = privkey.pem | ||
| + | distinguished_name = req_distinguished_name | ||
| + | attributes = req_attributes | ||
| + | x509_extensions = v3_ca # The extentions to add to the self signed cert | ||
| + | |||
| + | # Passwords for private keys if not present they will be prompted for | ||
| + | # input_password = secret | ||
| + | # output_password = secret | ||
| + | |||
| + | # This sets a mask for permitted string types. There are several options. | ||
| + | # default: PrintableString, | ||
| + | # pkix : PrintableString, | ||
| + | # utf8only: only UTF8Strings (PKIX recommendation after 2004). | ||
| + | # nombstr : PrintableString, | ||
| + | # MASK:XXXX a literal mask value. | ||
| + | # WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings. | ||
| + | string_mask = utf8only | ||
| + | |||
| + | # req_extensions = v3_req # The extensions to add to a certificate request | ||
| + | |||
| + | [ req_distinguished_name ] | ||
| + | countryName = Country Name (2 letter code) | ||
| + | # Django : 2017-02-14 | ||
| + | # default: countryName_default = XX | ||
| + | countryName_default = DE | ||
| + | countryName_min = 2 | ||
| + | countryName_max = 2 | ||
| + | |||
| + | stateOrProvinceName = State or Province Name (full name) | ||
| + | # Django : 2017-02-14 | ||
| + | # default: # | ||
| + | stateOrProvinceName_default = Bayern | ||
| + | |||
| + | localityName = Locality Name (eg, city) | ||
| + | # Django : 2017-02-14 | ||
| + | # default: localityName_default = Default City | ||
| + | localityName_default = Pliening | ||
| + | |||
| + | 0.organizationName = Organization Name (eg, company) | ||
| + | # Django : 2017-02-14 | ||
| + | # default: 0.organizationName_default = Default Company Ltd | ||
| + | 0.organizationName_default = nausch.org | ||
| + | |||
| + | # we can do this but it is not needed normally :-) | ||
| + | # | ||
| + | # | ||
| + | |||
| + | organizationalUnitName = Organizational Unit Name (eg, section) | ||
| + | # Django : 2017-02-14 | ||
| + | # default: # | ||
| + | organizationalUnitName_default = IT-Monitoring | ||
| + | |||
| + | commonName = Common Name (eg, your name or your server\' | ||
| + | commonName_max = 64 | ||
| + | |||
| + | emailAddress = Email Address | ||
| + | emailAddress_max = 64 | ||
| + | # Django : 2017-02-14 | ||
| + | # default: unset | ||
| + | emailAddress_default = graylog-admin@nausch.org | ||
| + | |||
| + | # SET-ex3 = SET extension number 3 | ||
| + | |||
| + | [ req_attributes ] | ||
| + | challengePassword = A challenge password | ||
| + | challengePassword_min = 4 | ||
| + | challengePassword_max = 20 | ||
| + | |||
| + | unstructuredName = An optional company name | ||
| + | |||
| + | [ usr_cert ] | ||
| + | |||
| + | # These extensions are added when ' | ||
| + | |||
| + | # This goes against PKIX guidelines but some CAs do it and some software | ||
| + | # requires this to avoid interpreting an end user certificate as a CA. | ||
| + | |||
| + | basicConstraints=CA: | ||
| + | |||
| + | # Here are some examples of the usage of nsCertType. If it is omitted | ||
| + | # the certificate can be used for anything *except* object signing. | ||
| + | |||
| + | # This is OK for an SSL server. | ||
| + | # nsCertType = server | ||
| + | |||
| + | # For an object signing certificate this would be used. | ||
| + | # nsCertType = objsign | ||
| + | |||
| + | # For normal client use this is typical | ||
| + | # nsCertType = client, email | ||
| + | |||
| + | # and for everything including object signing: | ||
| + | # nsCertType = client, email, objsign | ||
| + | |||
| + | # This is typical in keyUsage for a client certificate. | ||
| + | # keyUsage = nonRepudiation, | ||
| + | |||
| + | # This will be displayed in Netscape' | ||
| + | nsComment = " | ||
| + | |||
| + | # PKIX recommendations harmless if included in all certificates. | ||
| + | subjectKeyIdentifier=hash | ||
| + | authorityKeyIdentifier=keyid, | ||
| + | |||
| + | # This stuff is for subjectAltName and issuerAltname. | ||
| + | # Import the email address. | ||
| + | # subjectAltName=email: | ||
| + | # An alternative to produce certificates that aren't | ||
| + | # deprecated according to PKIX. | ||
| + | # subjectAltName=email: | ||
| + | |||
| + | # Copy subject details | ||
| + | # issuerAltName=issuer: | ||
| + | |||
| + | # | ||
| + | #nsBaseUrl | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # This is required for TSA certificates. | ||
| + | # extendedKeyUsage = critical, | ||
| + | |||
| + | [ v3_req ] | ||
| + | |||
| + | # Extensions to add to a certificate request | ||
| + | |||
| + | basicConstraints = CA:FALSE | ||
| + | keyUsage = nonRepudiation, | ||
| + | |||
| + | [ v3_ca ] | ||
| + | |||
| + | |||
| + | # Extensions for a typical CA | ||
| + | |||
| + | |||
| + | # PKIX recommendation. | ||
| + | |||
| + | subjectKeyIdentifier=hash | ||
| + | |||
| + | authorityKeyIdentifier=keyid: | ||
| + | |||
| + | # This is what PKIX recommends but some broken software chokes on critical | ||
| + | # extensions. | ||
| + | # | ||
| + | # So we do this instead. | ||
| + | basicConstraints = CA:true | ||
| + | |||
| + | # Key usage: this is typical for a CA certificate. However since it will | ||
| + | # prevent it being used as an test self-signed certificate it is best | ||
| + | # left out by default. | ||
| + | # keyUsage = cRLSign, keyCertSign | ||
| + | |||
| + | # Some might want this also | ||
| + | # nsCertType = sslCA, emailCA | ||
| + | |||
| + | # Include email address in subject alt name: another PKIX recommendation | ||
| + | # subjectAltName=email: | ||
| + | # Copy issuer details | ||
| + | # issuerAltName=issuer: | ||
| + | |||
| + | # DER hex encoding of an extension: beware experts only! | ||
| + | # obj=DER: | ||
| + | # Where ' | ||
| + | # You can even override a supported extension: | ||
| + | # basicConstraints= critical, DER: | ||
| + | |||
| + | [ crl_ext ] | ||
| + | |||
| + | # CRL extensions. | ||
| + | # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. | ||
| + | |||
| + | # issuerAltName=issuer: | ||
| + | authorityKeyIdentifier=keyid: | ||
| + | |||
| + | [ proxy_cert_ext ] | ||
| + | # These extensions should be added when creating a proxy certificate | ||
| + | |||
| + | # This goes against PKIX guidelines but some CAs do it and some software | ||
| + | # requires this to avoid interpreting an end user certificate as a CA. | ||
| + | |||
| + | basicConstraints=CA: | ||
| + | |||
| + | # Here are some examples of the usage of nsCertType. If it is omitted | ||
| + | # the certificate can be used for anything *except* object signing. | ||
| + | |||
| + | # This is OK for an SSL server. | ||
| + | # nsCertType = server | ||
| + | |||
| + | # For an object signing certificate this would be used. | ||
| + | # nsCertType = objsign | ||
| + | |||
| + | # For normal client use this is typical | ||
| + | # nsCertType = client, email | ||
| + | |||
| + | # and for everything including object signing: | ||
| + | # nsCertType = client, email, objsign | ||
| + | |||
| + | # This is typical in keyUsage for a client certificate. | ||
| + | # keyUsage = nonRepudiation, | ||
| + | |||
| + | # This will be displayed in Netscape' | ||
| + | nsComment = " | ||
| + | |||
| + | # PKIX recommendations harmless if included in all certificates. | ||
| + | subjectKeyIdentifier=hash | ||
| + | authorityKeyIdentifier=keyid, | ||
| + | |||
| + | # This stuff is for subjectAltName and issuerAltname. | ||
| + | # Import the email address. | ||
| + | # subjectAltName=email: | ||
| + | # An alternative to produce certificates that aren't | ||
| + | # deprecated according to PKIX. | ||
| + | # subjectAltName=email: | ||
| + | |||
| + | # Copy subject details | ||
| + | # issuerAltName=issuer: | ||
| + | |||
| + | # | ||
| + | #nsBaseUrl | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # This really needs to be in place for it to be a proxy certificate. | ||
| + | proxyCertInfo=critical, | ||
| + | |||
| + | #################################################################### | ||
| + | [ tsa ] | ||
| + | |||
| + | default_tsa = tsa_config1 # | ||
| + | |||
| + | [ tsa_config1 ] | ||
| + | |||
| + | # These are used by the TSA reply generation only. | ||
| + | dir = ./demoCA # TSA root directory | ||
| + | serial = $dir/ | ||
| + | crypto_device = builtin # OpenSSL engine to use for signing | ||
| + | signer_cert = $dir/ | ||
| + | # (optional) | ||
| + | certs = $dir/ | ||
| + | # (optional) | ||
| + | signer_key = $dir/ | ||
| + | |||
| + | default_policy = tsa_policy1 # | ||
| + | # (optional) | ||
| + | other_policies = tsa_policy2, | ||
| + | digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory) | ||
| + | accuracy = secs:1, millisecs: | ||
| + | clock_precision_digits | ||
| + | ordering = yes # Is ordering defined for timestamps? | ||
| + | # (optional, default: no) | ||
| + | tsa_name = yes # Must the TSA name be included in the reply? | ||
| + | # (optional, default: no) | ||
| + | ess_cert_id_chain = no # Must the ESS cert id chain be included? | ||
| + | # (optional, default: no)</ | ||
| + | |||
| + | ==== Bearbeitungsschritte bei neunen rsyslog Clients ==== | ||
| + | Bei einem neune Client, den wir an unseren graylog Server anbinden wollen, sind nun zusammengefasst folgende Schritte nötig (im nachfolgenden Beispiel für Host vml000137): | ||
| + | |||
| + | * auf dem **graylog** Server: | ||
| + | - Schlüssel für den rsyslog-Client erzeugen < | ||
| + | - Passphrase des gerade erzeiugten Client-Schlüssels entfernen < | ||
| + | - Schlüssel mit passphrase vernichten < | ||
| + | - Schlüssel auf den Clientrechner transferieren < | ||
| + | - Zertificatsrequest erzeugen < | ||
| + | -out / | ||
| + | - Zertifikatsrequest der eigenen CA vorlegen. < | ||
| + | / | ||
| + | - Zertifikatsrequest durch die CA bearbeiten und Zertifikat erzeugen. < | ||
| + | -out / | ||
| + | - Zertifikat ausgeben und auf den Client-/ | ||
| + | - Clientzertifikat dem graylog Server bekannt machden. < | ||
| + | / | ||
| + | - Root CA Zertifikat dem Client zur Verfügung stellen. < | ||
| + | - **rsyslog-gnutls** auf dem Client installieren. < | ||
| + | - originale rsyslog-Konfigurationsdatei sichern. < | ||
| + | - rsyslog konfigurieren. < | ||
| + | |||
| + | # For more information see / | ||
| + | # If you experience problems, see http:// | ||
| + | |||
| + | #### MODULES #### | ||
| + | |||
| + | # Django : 2017-2-14 | ||
| + | # default: unset | ||
| + | $DefaultNetstreamDriver gtls #make gtls driver the default | ||
| + | |||
| + | # The imjournal module bellow is now used as a message source instead of imuxsock. | ||
| + | $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) | ||
| + | # Django : 2017-09-26 | ||
| + | # default: $ModLoad imjournal # provides access to the systemd journal | ||
| + | #$ModLoad imklog # reads kernel messages (the same are read from journald) | ||
| + | #$ModLoad immark | ||
| + | |||
| + | # Provides UDP syslog reception | ||
| + | #$ModLoad imudp | ||
| + | # | ||
| + | |||
| + | # Provides TCP syslog reception | ||
| + | #$ModLoad imtcp | ||
| + | # | ||
| + | |||
| + | |||
| + | #### GLOBAL DIRECTIVES #### | ||
| + | |||
| + | # Where to place auxiliary files | ||
| + | $WorkDirectory / | ||
| + | |||
| + | # Use default timestamp format | ||
| + | $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat | ||
| + | |||
| + | # File syncing capability is disabled by default. This feature is usually not required, | ||
| + | # not useful and an extreme performance hit | ||
| + | # | ||
| + | |||
| + | # Include all config files in / | ||
| + | $IncludeConfig / | ||
| + | |||
| + | # Turn off message reception via local log socket; | ||
| + | # local messages are retrieved through imjournal now. | ||
| + | # Django : 2017-09-26 | ||
| + | # default: $OmitLocalLogging on | ||
| + | |||
| + | # File to store the position in the journal | ||
| + | # Django : 2017-09-26 | ||
| + | # default: $IMJournalStateFile imjournal.state | ||
| + | |||
| + | # Django : 2017-02-14 - certificate files for TLS | ||
| + | # default: unset | ||
| + | $DefaultNetstreamDriverCAFile | ||
| + | $DefaultNetstreamDriverCertFile / | ||
| + | $DefaultNetstreamDriverKeyFile | ||
| + | |||
| + | $ActionSendStreamDriverAuthMode x509/name | ||
| + | $ActionSendStreamDriverPermittedPeer graylog-server.dmz.nausch.org | ||
| + | # run driver in TLS-only mode | ||
| + | $ActionSendStreamDriverMode 1 | ||
| + | |||
| + | #### RULES #### | ||
| + | |||
| + | # Log all kernel messages to the console. | ||
| + | # Logging much else clutters up the screen. | ||
| + | # | ||
| + | |||
| + | # Log anything (except mail) of level info or higher. | ||
| + | # Don't log private authentication messages! | ||
| + | *.info; | ||
| + | |||
| + | # The authpriv file has restricted access. | ||
| + | authpriv.* | ||
| + | |||
| + | # Log all the mail messages in one place. | ||
| + | mail.* | ||
| + | |||
| + | |||
| + | # Log cron stuff | ||
| + | cron.* | ||
| + | |||
| + | # Everybody gets emergency messages | ||
| + | *.emerg | ||
| + | |||
| + | # Save news errors of level crit and higher in a special file. | ||
| + | uucp, | ||
| + | |||
| + | # Save boot messages also to boot.log | ||
| + | local7.* | ||
| + | |||
| + | |||
| + | # ### begin forwarding rule ### | ||
| + | # The statement between the begin ... end define a SINGLE forwarding | ||
| + | # rule. They belong together, do NOT split them. If you create multiple | ||
| + | # forwarding rules, duplicate the whole block! | ||
| + | # Remote Logging (we use TCP for reliable delivery) | ||
| + | # | ||
| + | # An on-disk queue is created for this action. If the remote host is | ||
| + | # down, messages are spooled to disk and sent when it is up again. | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # remote host is: name/ | ||
| + | #*.* @@remote-host: | ||
| + | # | ||
| + | # Django : 2017-02-14 | ||
| + | $template GRAYLOGRFC5424,"< | ||
| + | *.* @10.0.0.117: | ||
| + | # | ||
| + | # ### end of the forwarding rule ###</ | ||
| + | - rsyslog-Daemon neu starten zum Aktivieren der Konfigurationsänderung.< | ||
| + | |||
| + | <WRAP center round important 90%> | ||
| + | **FAZIT**: | ||
| + | |||
| + | Mit Hilfe dieser 14 Bearbeitungsschritte kann nicht nur der Übertragungsweg zwischen rsyslog-client und graylog-server abgesichert und sondern auch der Zugriff des Clients auf den zentralen syslog-server geregelt werden. | ||
| + | |||
| + | Mit einfachen Boardmitteln unseres CentOS 7 Servers kann somit ein wesentlicher Beitrag zur Vertraulichkeit und Integrität von syslog-informationen geleistet werden und ein ungesicherte und ungeschützte Übertragung von sensitiven syslog-Informationen sollten der Vergangenheit angehören. Auch wenn der ungeübten Admin diesen Umstand bis jetzt erfolgreich verdrängte! | ||
| + | </ | ||
| ====== Links ====== | ====== Links ====== | ||
| Zeile 3954: | Zeile 4800: | ||
| * **[[http:// | * **[[http:// | ||
| - | ~~DISCUSSION~~ | + | |