{"id":3698,"date":"2023-11-27T07:00:00","date_gmt":"2023-11-27T05:00:00","guid":{"rendered":"https:\/\/www.my-it-brain.de\/wordpress\/?p=3698"},"modified":"2023-11-25T17:11:28","modified_gmt":"2023-11-25T16:11:28","slug":"rhel-system-roles-nbde_server","status":"publish","type":"post","link":"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-nbde_server\/","title":{"rendered":"RHEL System Roles: nbde_server"},"content":{"rendered":"\n<p>In diesem Artikel stelle ich euch die <a href=\"https:\/\/www.my-it-brain.de\/wordpress\/vorstellung-der-red-hat-enterprise-linux-rhel-system-roles\/\" data-type=\"post\" data-id=\"3338\">RHEL System Role<\/a> <code>nbde_server<\/code> vor, mit welcher sich <a href=\"https:\/\/github.com\/latchset\/tang\">Tang<\/a>-Server f\u00fcr <a href=\"https:\/\/www.my-it-brain.de\/wordpress\/network-bound-disk-encryption-im-ueberblick\/\" data-type=\"post\" data-id=\"2974\">Network Bound Disk Encryption<\/a> (NBDE) installieren lassen. Er ist Bestandteil einer losen Serie, in der ich eine Reihe von System Roles vorstelle, mit denen h\u00e4ufig anfallende Aufgaben in der Systemadministration erledigt werden k\u00f6nnen.<\/p>\n\n\n\n<p>Wer sich zuerst \u00fcber die genannten Begriffe informieren m\u00f6chte, lese zuerst:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/network-bound-disk-encryption-im-ueberblick\/\" data-type=\"post\" data-id=\"2974\">Network Bound Disk Encryption im \u00dcberblick<\/a> und<\/li>\n\n\n\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/vorstellung-der-red-hat-enterprise-linux-rhel-system-roles\/\" data-type=\"post\" data-id=\"3338\">Vorstellung der Red Hat Enterprise Linux (RHEL) System Roles<\/a><\/li>\n<\/ul>\n\n\n\n<p>Im folgenden Text verwende ich die Begriffe NBDE-Server und Tang-Server synonym. Bitte lasst euch dadurch nicht verwirren.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Umgebung<\/h2>\n\n\n\n<p>F\u00fcr das folgende Beispiel verwende ich eine Umgebung, bestehend aus:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Einem Ansible-Controller mit den Paketen (RHEL 9)\n<ul class=\"wp-block-list\">\n<li><code>ansible-core<\/code><\/li>\n\n\n\n<li><code>rhel-system-roles<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Jeweils einem RHEL 8 und RHEL 9 Server mit Minimalinstallation<\/li>\n<\/ul>\n\n\n\n<p>Die Installation von RHEL sowie der genannten Pakete sind nicht Bestandteil dieses Artikels. Wer hierzu einen Einstieg sucht, findet entsprechende Dokumentation unter:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/8\/html\/performing_a_standard_rhel_8_installation\">Performing a standard RHEL 8 installation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/9\/html\/performing_a_standard_rhel_9_installation\">Performing a standard RHEL 9 installation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/9\/html\/managing_software_with_the_dnf_tool\/assembly_installing-rhel-9-content_managing-software-with-the-dnf-tool#proc_installing-packages_assembly_installing-rhel-9-content\" data-type=\"link\" data-id=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/9\/html\/managing_software_with_the_dnf_tool\/assembly_installing-rhel-9-content_managing-software-with-the-dnf-tool#proc_installing-packages_assembly_installing-rhel-9-content\">Installing packages using DNF<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Die Rolle<\/h2>\n\n\n\n<p>Durch die Installation des Pakets <code>rhel-system-roles<\/code> existiert diese Rolle bereits auf meinem System und muss nur noch konfiguriert werden. Die Rolle selbst findet man im Pfad <code>\/usr\/share\/ansible\/roles\/rhel-system-roles.nbde_server\/<\/code> und die Dokumentation in <code>\/usr\/share\/doc\/rhel-system-roles\/nbde_server\/README.md<\/code>. Letztere enth\u00e4lt verschiedene Beispiele f\u00fcr h\u00e4ufige Anwendungsf\u00e4lle.<\/p>\n\n\n\n<p>Ich m\u00f6chte mit dieser Rolle Folgendes erreichen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installation von Tang auf den beiden Zielsystemen<\/li>\n\n\n\n<li>Konfiguration von SELinux im Modus <code>enforcing<\/code><\/li>\n\n\n\n<li>Konfiguration der Host-Firewall<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Das Playbook<\/h2>\n\n\n\n<p>Das Playbook ist recht \u00fcbersichtlich. <code>tang<\/code> bezeichnet eine Gruppe aus meinem Ansible-Inventory, welche die Systeme enth\u00e4lt, die ich als NBDE-Server konfigurieren m\u00f6chte.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>---\n- name: Manage nbde server with selinux and firewall\n  hosts: tang\n  vars:\n    nbde_server_manage_firewall: true\n    nbde_server_manage_selinux: true\n  roles:\n    - rhel-system-roles.nbde_server<\/code><\/pre>\n\n\n\n<p>Nach der Anwendung der Rolle lauscht der Tang-Service auf Port <code>80\/tcp<\/code> der Zielsysteme und ist aus dem Netzwerk erreichbar.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Probleme<\/h2>\n\n\n\n<p>Leider l\u00e4uft es dieses Mal nicht ganz so rund wie \u00fcblich. Der Task <code>[redhat.rhel_system_roles.selinux : Set an SELinux label on a port]<\/code> schl\u00e4gt auf dem RHEL 8 Host mit folgender Fehlermeldung fehl: &#8222;Failed to import the required Python library (libselinux-python)&#8220;<\/p>\n\n\n\n<p>Das Problem und die L\u00f6sung beschreibt Red Hat in dem Solution Article: <a href=\"https:\/\/access.redhat.com\/solutions\/5674911\">Ansible playbook fails with libselinux-python aren&#8217;t installed on RHEL8<\/a> (Login required)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fazit<\/h2>\n\n\n\n<p>Diesmal lief es nicht ganz so reibungslos wie gewohnt.<\/p>\n\n\n\n<p>Letztendlich konnten die beiden NBDE-Server dennoch schneller konfiguriert werden, als w\u00e4re ich der manuellen Prozedur in <a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/8\/html\/security_hardening\/configuring-automated-unlocking-of-encrypted-volumes-using-policy-based-decryption_security-hardening\" data-type=\"link\" data-id=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/8\/html\/security_hardening\/configuring-automated-unlocking-of-encrypted-volumes-using-policy-based-decryption_security-hardening\">Chapter 12. Configuring automated unlocking of encrypted volumes using policy-based decryption<\/a> gefolgt.<\/p>\n\n\n\n<p>Die Server sind damit aufgesetzt, n\u00e4chste Woche beschreibe ich, wie die Clients konfiguriert werden.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quellen und weiterf\u00fchrende Links<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/access.redhat.com\/articles\/3050101\">Red Hat Enterprise Linux (RHEL) System Roles {en}<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/user_guide\/playbooks_reuse_roles.html#role-directory-structure\">Ansible Documentation: Role Directory Structure {en}<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/access.redhat.com\/downloads\/\">Red Hat Software and Download Center {en}<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.redhat.com\/de\/about\/value-of-subscription\">Die Vorteile einer Red Hat Subskription<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-selinux\/\">RHEL System Roles: selinux<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-timesync\/\">RHEL System Roles: timesync<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-sshd\/\">RHEL System Roles: sshd<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-firewall\/\" data-type=\"post\" data-id=\"3367\">RHEL System Roles: firewall<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-rhc\/\" data-type=\"post\" data-id=\"3577\">RHEL System Roles: rhc<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In diesem Artikel stelle ich euch die RHEL System Role nbde_server vor, mit welcher sich Tang-Server f\u00fcr Network Bound Disk Encryption (NBDE) installieren lassen. Er ist Bestandteil einer losen Serie, in der ich eine Reihe von System Roles vorstelle, mit denen h\u00e4ufig anfallende Aufgaben in der Systemadministration erledigt werden k\u00f6nnen. Wer sich zuerst \u00fcber die<span class=\"continue-reading\"> <a href=\"https:\/\/www.my-it-brain.de\/wordpress\/rhel-system-roles-nbde_server\/\">[Weiterlesen&#8230;]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_metis_text_type":"","_metis_text_length":0,"_post_count":0,"footnotes":""},"categories":[532],"tags":[410,813,430,305,754],"class_list":["post-3698","post","type-post","status-publish","format-standard","hentry","category-ansible","tag-ansible","tag-nbde_server","tag-osbn","tag-planet","tag-rhel-system-roles"],"_links":{"self":[{"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/posts\/3698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/comments?post=3698"}],"version-history":[{"count":10,"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/posts\/3698\/revisions"}],"predecessor-version":[{"id":3714,"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/posts\/3698\/revisions\/3714"}],"wp:attachment":[{"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/media?parent=3698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/categories?post=3698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.my-it-brain.de\/wordpress\/wp-json\/wp\/v2\/tags?post=3698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}