<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Ansible_KIT_Firewall-Konfiguration</id>
	<title>Ansible KIT Firewall-Konfiguration - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Ansible_KIT_Firewall-Konfiguration"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Ansible_KIT_Firewall-Konfiguration&amp;action=history"/>
	<updated>2026-04-17T00:09:19Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Ansible_KIT_Firewall-Konfiguration&amp;diff=68453&amp;oldid=prev</id>
		<title>Thomas.will am 7. April 2026 um 13:20 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Ansible_KIT_Firewall-Konfiguration&amp;diff=68453&amp;oldid=prev"/>
		<updated>2026-04-07T13:20:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 7. April 2026, 13:20 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Zeile 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Diese Werte werden in alle Konfigurationsdateien als Jinja2-Variablen eingesetzt, z.B. &amp;lt;code&amp;gt;172.26.{{ fw_xx }}.1&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Diese Werte werden in alle Konfigurationsdateien als Jinja2-Variablen eingesetzt, z.B. &amp;lt;code&amp;gt;172.26.{{ fw_xx }}.1&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;Hinweis zur Domain:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Die Domain lautet &amp;lt;code&amp;gt;it212.int&amp;lt;/code&amp;gt; – also &amp;lt;code&amp;gt;it{{ fw_xx }}.int&amp;lt;/code&amp;gt; in den Templates (nicht &amp;lt;code&amp;gt;it2{{ fw_xx }}.int&amp;lt;/code&amp;gt;).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Projektstruktur ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Projektstruktur ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot; &gt;Zeile 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Alle Konfigurationsdateien werden als Jinja2-Templates verwaltet. Ansible befüllt die Variablen beim Ausführen pro Host automatisch.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Alle Konfigurationsdateien werden als Jinja2-Templates verwaltet. Ansible befüllt die Variablen beim Ausführen pro Host automatisch.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==== Hostname ====&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Der Hostname wird direkt per Ansible-Modul gesetzt:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fw.it{{ fw_xx }}.int&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==== /etc/hosts ====&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;127.0.0.1        localhost&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;127.0.1.1        fw.it{{ fw_xx }}.int fw&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;::1      localhost ip6-localhost ip6-loopback&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ff02::1  ip6-allnodes&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ff02::2  ip6-allrouters&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==== /etc/resolv.conf ====&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;search it{{ fw_xx }}.int&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nameserver 192.168.{{ fw_y }}.88&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== /etc/network/interfaces ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== /etc/network/interfaces ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki:diff::1.12:old-68447:rev-68453 --&gt;
&lt;/table&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Ansible_KIT_Firewall-Konfiguration&amp;diff=68447&amp;oldid=prev</id>
		<title>Thomas.will: Die Seite wurde neu angelegt: „= Firewall-Konfiguration mit Ansible =  Dieser Artikel zeigt wie man mehrere Firewall-VMs automatisiert mit Ansible konfiguriert. Wir ve…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Ansible_KIT_Firewall-Konfiguration&amp;diff=68447&amp;oldid=prev"/>
		<updated>2026-04-07T12:43:24Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „= Firewall-Konfiguration mit Ansible =  Dieser Artikel zeigt wie man mehrere Firewall-VMs automatisiert mit &lt;a href=&quot;/index.php/Ansible_Grundlagen&quot; title=&quot;Ansible Grundlagen&quot;&gt;Ansible&lt;/a&gt; konfiguriert. Wir ve…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Firewall-Konfiguration mit Ansible =&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel zeigt wie man mehrere Firewall-VMs automatisiert mit [[Ansible Grundlagen|Ansible]] konfiguriert.&lt;br /&gt;
Wir verwenden eine Ansible-Rolle die Netzwerk-Interfaces, Hostnamen, DNS-Auflösung und NAT mit nftables einrichtet.&lt;br /&gt;
&lt;br /&gt;
== Voraussetzungen ==&lt;br /&gt;
&lt;br /&gt;
* Ansible ist auf dem Control-Node installiert ([[Ansible Grundlagen]])&lt;br /&gt;
* Alle Firewall-VMs sind erreichbar (SSH)&lt;br /&gt;
* User &amp;lt;code&amp;gt;kit&amp;lt;/code&amp;gt; ist auf allen VMs vorhanden und hat &amp;lt;code&amp;gt;sudo NOPASSWD&amp;lt;/code&amp;gt;-Rechte&lt;br /&gt;
* SSH-Schlüssel ist hinterlegt&lt;br /&gt;
&lt;br /&gt;
== Variablen ==&lt;br /&gt;
&lt;br /&gt;
Jede Firewall-VM hat zwei individuelle Werte:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Bedeutung !! Beispiel&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;fw_xx&amp;lt;/code&amp;gt; || Teilnehmernummer (201–213) || &amp;lt;code&amp;gt;212&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;fw_y&amp;lt;/code&amp;gt; || Klassensaal (1–16) || &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Diese Werte werden in alle Konfigurationsdateien als Jinja2-Variablen eingesetzt, z.B. &amp;lt;code&amp;gt;172.26.{{ fw_xx }}.1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Projektstruktur ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ansible-fw/&lt;br /&gt;
├── ansible.cfg&lt;br /&gt;
├── site.yml&lt;br /&gt;
├── inventory/&lt;br /&gt;
│   └── hosts.ini&lt;br /&gt;
└── roles/&lt;br /&gt;
    └── fw/&lt;br /&gt;
        ├── tasks/&lt;br /&gt;
        │   └── main.yml&lt;br /&gt;
        ├── handlers/&lt;br /&gt;
        │   └── main.yml&lt;br /&gt;
        └── templates/&lt;br /&gt;
            ├── interfaces.j2&lt;br /&gt;
            ├── hosts.j2&lt;br /&gt;
            ├── resolv.conf.j2&lt;br /&gt;
            ├── nftables.conf.j2&lt;br /&gt;
            └── 99-ipforward.conf.j2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory ==&lt;br /&gt;
&lt;br /&gt;
In der Datei &amp;lt;code&amp;gt;inventory/hosts.ini&amp;lt;/code&amp;gt; werden alle Firewall-VMs definiert.&lt;br /&gt;
Jeder Host bekommt seine eigene &amp;lt;code&amp;gt;fw_xx&amp;lt;/code&amp;gt;-Variable. Die gemeinsamen Variablen stehen unter &amp;lt;code&amp;gt;[firewalls:vars]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[firewalls]&lt;br /&gt;
fw201 ansible_host=192.168.16.201 fw_xx=201&lt;br /&gt;
fw202 ansible_host=192.168.16.202 fw_xx=202&lt;br /&gt;
...&lt;br /&gt;
fw213 ansible_host=192.168.16.213 fw_xx=213&lt;br /&gt;
&lt;br /&gt;
[firewalls:vars]&lt;br /&gt;
ansible_user=kit&lt;br /&gt;
ansible_become=true&lt;br /&gt;
ansible_become_method=sudo&lt;br /&gt;
fw_y=16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ansible.cfg ==&lt;br /&gt;
&lt;br /&gt;
Die &amp;lt;code&amp;gt;ansible.cfg&amp;lt;/code&amp;gt; im Projektverzeichnis setzt Standardwerte damit man diese nicht jedes Mal auf der Kommandozeile angeben muss.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[defaults]&lt;br /&gt;
inventory         = inventory/hosts.ini&lt;br /&gt;
remote_user       = kit&lt;br /&gt;
host_key_checking = False&lt;br /&gt;
&lt;br /&gt;
[privilege_escalation]&lt;br /&gt;
become        = True&lt;br /&gt;
become_method = sudo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Playbook ==&lt;br /&gt;
&lt;br /&gt;
Das Playbook &amp;lt;code&amp;gt;site.yml&amp;lt;/code&amp;gt; ist bewusst einfach gehalten – es ruft nur die Rolle &amp;lt;code&amp;gt;fw&amp;lt;/code&amp;gt; auf.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---&lt;br /&gt;
- name: Firewall-VMs konfigurieren&lt;br /&gt;
  hosts: firewalls&lt;br /&gt;
  gather_facts: false&lt;br /&gt;
&lt;br /&gt;
  roles:&lt;br /&gt;
    - fw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rolle: fw ==&lt;br /&gt;
&lt;br /&gt;
=== Tasks ===&lt;br /&gt;
&lt;br /&gt;
Die Datei &amp;lt;code&amp;gt;roles/fw/tasks/main.yml&amp;lt;/code&amp;gt; führt alle Konfigurationsschritte der Reihe nach aus:&lt;br /&gt;
&lt;br /&gt;
# Hostname setzen&lt;br /&gt;
# &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; konfigurieren&lt;br /&gt;
# &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; konfigurieren&lt;br /&gt;
# &amp;lt;code&amp;gt;/etc/resolv.conf&amp;lt;/code&amp;gt; konfigurieren&lt;br /&gt;
# &amp;lt;code&amp;gt;/etc/nftables.conf&amp;lt;/code&amp;gt; konfigurieren&lt;br /&gt;
# nftables aktivieren und starten&lt;br /&gt;
# IP-Forward konfigurieren&lt;br /&gt;
# Reboot&lt;br /&gt;
&lt;br /&gt;
Wenn sich &amp;lt;code&amp;gt;interfaces&amp;lt;/code&amp;gt; oder &amp;lt;code&amp;gt;nftables.conf&amp;lt;/code&amp;gt; ändern, lösen die Tasks automatisch die zugehörigen Handler aus (Neustart des Dienstes).&lt;br /&gt;
&lt;br /&gt;
=== Templates ===&lt;br /&gt;
&lt;br /&gt;
Alle Konfigurationsdateien werden als Jinja2-Templates verwaltet. Ansible befüllt die Variablen beim Ausführen pro Host automatisch.&lt;br /&gt;
&lt;br /&gt;
==== /etc/network/interfaces ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#WAN&lt;br /&gt;
auto enp0s3&lt;br /&gt;
iface enp0s3 inet static&lt;br /&gt;
 address 192.168.{{ fw_y }}.{{ fw_xx }}/24&lt;br /&gt;
 gateway 192.168.{{ fw_y }}.254&lt;br /&gt;
 post-up ip route add 10.88.0.0/16 via 192.168.{{ fw_y }}.88&lt;br /&gt;
&lt;br /&gt;
#DMZ&lt;br /&gt;
auto enp0s8&lt;br /&gt;
iface enp0s8 inet static&lt;br /&gt;
 address 10.88.{{ fw_xx }}.1/24&lt;br /&gt;
&lt;br /&gt;
#LAN&lt;br /&gt;
auto enp0s9&lt;br /&gt;
iface enp0s9 inet static&lt;br /&gt;
 address 172.26.{{ fw_xx }}.1/24&lt;br /&gt;
&lt;br /&gt;
#SERVERS&lt;br /&gt;
auto enp0s10&lt;br /&gt;
iface enp0s10 inet static&lt;br /&gt;
 address 10.{{ fw_xx }}.1.1/24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/nftables.conf ====&lt;br /&gt;
&lt;br /&gt;
Die Firewall verwendet NAT mit Masquerading. Pakete aus DMZ, LAN und SERVERS werden über das WAN-Interface (&amp;lt;code&amp;gt;enp0s3&amp;lt;/code&amp;gt;) nach außen weitergeleitet.&lt;br /&gt;
Interner Verkehr innerhalb &amp;lt;code&amp;gt;192.168.Y.0/24&amp;lt;/code&amp;gt; und &amp;lt;code&amp;gt;10.88.0.0/16&amp;lt;/code&amp;gt; wird nicht genattet (RETURN).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define LAN    = 172.26.{{ fw_xx }}.0/24&lt;br /&gt;
define SERVER = 10.{{ fw_xx }}.1.0/24&lt;br /&gt;
define DMZ    = 10.88.{{ fw_xx }}.0/24&lt;br /&gt;
&lt;br /&gt;
flush ruleset&lt;br /&gt;
&lt;br /&gt;
table ip nat {&lt;br /&gt;
    chain postrouting {&lt;br /&gt;
        type nat hook postrouting priority 100; policy accept;&lt;br /&gt;
&lt;br /&gt;
        ip saddr $DMZ ip daddr 192.168.{{ fw_y }}.0/24 return&lt;br /&gt;
        ip saddr $DMZ ip daddr 10.88.0.0/16 return&lt;br /&gt;
        ip saddr $DMZ oif enp0s3 masquerade&lt;br /&gt;
        ip saddr $LAN oif enp0s3 masquerade&lt;br /&gt;
        ip saddr $SERVER oif enp0s3 masquerade&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== IP-Forward ====&lt;br /&gt;
&lt;br /&gt;
Damit die Firewall Pakete zwischen den Interfaces weiterleitet, muss IP-Forwarding aktiviert sein:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Diese Einstellung wird in &amp;lt;code&amp;gt;/etc/sysctl.d/99-ipforward.conf&amp;lt;/code&amp;gt; gespeichert und ist nach dem Reboot dauerhaft aktiv.&lt;br /&gt;
&lt;br /&gt;
== Ausführen ==&lt;br /&gt;
&lt;br /&gt;
;Alle Hosts:&lt;br /&gt;
* &amp;lt;code&amp;gt;ansible-playbook site.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Nur einzelne Hosts (z.B. zum Testen):&lt;br /&gt;
* &amp;lt;code&amp;gt;ansible-playbook site.yml --limit fw212,fw213&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Nur bestimmte Tasks ausführen (Tags, falls definiert):&lt;br /&gt;
* &amp;lt;code&amp;gt;ansible-playbook site.yml --limit fw212 --tags nftables&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[Ansible Grundlagen]]&lt;br /&gt;
* [[nftables Masquerade]]&lt;br /&gt;
* [[Debian Netzwerkkonfiguration]]&lt;/div&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
</feed>