<?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=Suricata_IPS_nftables</id>
	<title>Suricata IPS nftables - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Suricata_IPS_nftables"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;action=history"/>
	<updated>2026-06-29T07:54:48Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=62138&amp;oldid=prev</id>
		<title>Thomas.will: /* iptables Version */</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=62138&amp;oldid=prev"/>
		<updated>2025-04-23T05:21:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;iptables Version&lt;/span&gt;&lt;/span&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 23. April 2025, 05:21 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-l145&quot; &gt;Zeile 145:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 145:&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;* Damit Suricata die nicht gedroppten Pakete automatisch akzeptiert, sondern dies der Firewall überlässt, kann es diese Pakete markieren und zurück zu iptables schicken&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;* Damit Suricata die nicht gedroppten Pakete automatisch akzeptiert, sondern dies der Firewall überlässt, kann es diese Pakete markieren und zurück zu iptables schicken&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;div&gt;* Markierungen folgen der Syntax $''MARK''/$'''MASK'''&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;* Markierungen folgen der Syntax $''MARK''/$'''MASK'''&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== iptables Version ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* '''vim /usr/local/sbin/firewall'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; iptables -P FORWARD DROP&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; iptables -A FORWARD -m mark ! --mark ''1''/'''1''' -j NFQUEUE&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; iptables -A FORWARD -j LOG --log-prefix &amp;quot;iptables return from Suricata: &amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ...&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;/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;== nftables Version ==&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;== nftables Version ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=62137&amp;oldid=prev</id>
		<title>Thomas.will: /* Problematik */</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=62137&amp;oldid=prev"/>
		<updated>2025-04-23T05:20:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Problematik&lt;/span&gt;&lt;/span&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 23. April 2025, 05: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-l140&quot; &gt;Zeile 140:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 140:&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;*'''suricata -D -q 0&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;*'''suricata -D -q 0&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Problematik ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Dadurch, dass Suricata alle Pakete vom LAN zur DMZ behandelt, werden alle Pakete, die nicht ausdrücklich verworfen werden akzeptiert&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Wir müssen Suricata also so einstellen, dass es diese Pakete wieder iptables übergibt&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;/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;= NFQUEUE Repeat =&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;= NFQUEUE Repeat =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=62136&amp;oldid=prev</id>
		<title>Thomas.will: /* Firewallanpassung */</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=62136&amp;oldid=prev"/>
		<updated>2025-04-23T05:20:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Firewallanpassung&lt;/span&gt;&lt;/span&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 23. April 2025, 05: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-l135&quot; &gt;Zeile 135:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 135:&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;  drop http any any -&amp;gt; any any (msg: &amp;quot;Possible Command Injection attack (Contains semicolon POST DATA)&amp;quot;; flow:established,to_server; content:&amp;quot;%3B&amp;quot;; nocase; http_client_body; sid:5;)&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;  drop http any any -&amp;gt; any any (msg: &amp;quot;Possible Command Injection attack (Contains semicolon POST DATA)&amp;quot;; flow:established,to_server; content:&amp;quot;%3B&amp;quot;; nocase; http_client_body; sid:5;)&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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Firewallanpassung =&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;Ohne Return von der IPS, Hierzu müsste die IPS der Firewall nachgeschaltet sein.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* '''vim /usr/local/sbin/firewall'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;/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;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; iptables -P FORWARD DROP&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; iptables -A FORWARD -j NFQUEUE&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ...&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;/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;==Start suricata==&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;==Start suricata==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=59553&amp;oldid=prev</id>
		<title>Thomas.will: Die Seite wurde neu angelegt: „ =Grundlagen und Installation= *Suricata Grundlagen *Suricata Installation  =Versuchsaufbau= {{#drawio:ips-netz}}  =IPS= *Wir können mit iptables Pake…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Suricata_IPS_nftables&amp;diff=59553&amp;oldid=prev"/>
		<updated>2025-03-10T20:15:39Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „ =Grundlagen und Installation= *&lt;a href=&quot;/index.php/Suricata_Grundlagen&quot; title=&quot;Suricata Grundlagen&quot;&gt;Suricata Grundlagen&lt;/a&gt; *&lt;a href=&quot;/index.php/Suricata_Installation&quot; title=&quot;Suricata Installation&quot;&gt;Suricata Installation&lt;/a&gt;  =Versuchsaufbau= {{#drawio:ips-netz}}  =IPS= *Wir können mit iptables Pake…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=Grundlagen und Installation=&lt;br /&gt;
*[[Suricata Grundlagen]]&lt;br /&gt;
*[[Suricata Installation]]&lt;br /&gt;
&lt;br /&gt;
=Versuchsaufbau=&lt;br /&gt;
{{#drawio:ips-netz}}&lt;br /&gt;
&lt;br /&gt;
=IPS=&lt;br /&gt;
*Wir können mit iptables Pakete abfangen und einer QUEUE übergeben&lt;br /&gt;
*Diese QUEUE wird von suricata gelesen und ihrem REGELWERK übergeben.&lt;br /&gt;
*Wenn das Paket mit einer Regel übereinstimmt, wird eine Aktion ausgelöst.&lt;br /&gt;
*Alert führt zu einer Meldung&lt;br /&gt;
*Bei Drop wird das Paket verworfen. &lt;br /&gt;
{{#drawio:ips}}&lt;br /&gt;
&lt;br /&gt;
= Konfiguration Suricata =&lt;br /&gt;
&lt;br /&gt;
* '''vim /etc/suricata/suricata.yaml'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%YAML 1.1&lt;br /&gt;
---&lt;br /&gt;
# Variablen für die Adressgruppen festlegen&lt;br /&gt;
vars:&lt;br /&gt;
  address-groups:&lt;br /&gt;
    LAN: &amp;quot;[192.168.10.0/24]&amp;quot;&lt;br /&gt;
    DMZ: &amp;quot;[172.18.10.0/24]&amp;quot;&lt;br /&gt;
    INT: &amp;quot;[$LAN,$DMZ]&amp;quot;&lt;br /&gt;
    EXTERNAL_NET: &amp;quot;!$INT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Standard-Log-Verzeichnis&lt;br /&gt;
default-log-dir: /var/log/suricata/&lt;br /&gt;
&lt;br /&gt;
# Statistiken aktivieren&lt;br /&gt;
stats:&lt;br /&gt;
  enabled: yes&lt;br /&gt;
  interval: 8&lt;br /&gt;
&lt;br /&gt;
# Ausgaben konfigurieren&lt;br /&gt;
outputs:&lt;br /&gt;
  - fast:&lt;br /&gt;
      enabled: yes&lt;br /&gt;
      filename: fast.log&lt;br /&gt;
      append: yes&lt;br /&gt;
  - alert-debug:&lt;br /&gt;
      enabled: yes&lt;br /&gt;
      filename: alert-debug.log&lt;br /&gt;
      append: yes&lt;br /&gt;
  - stats:&lt;br /&gt;
      enabled: yes&lt;br /&gt;
      filename: stats.log&lt;br /&gt;
      append: yes&lt;br /&gt;
      totals: yes&lt;br /&gt;
      threads: no&lt;br /&gt;
&lt;br /&gt;
# Logging-Einstellungen&lt;br /&gt;
logging:&lt;br /&gt;
  default-log-level: notice&lt;br /&gt;
  outputs:&lt;br /&gt;
  - console:&lt;br /&gt;
      enabled: yes&lt;br /&gt;
  - file:&lt;br /&gt;
      enabled: yes&lt;br /&gt;
      level: info&lt;br /&gt;
      filename: suricata.log&lt;br /&gt;
&lt;br /&gt;
# Netzwerkschnittstellen konfigurieren&lt;br /&gt;
af-packet:&lt;br /&gt;
  - interface: enp0s3&lt;br /&gt;
    threads: auto&lt;br /&gt;
    cluster-id: 97&lt;br /&gt;
    cluster-type: cluster_flow&lt;br /&gt;
    defrag: yes&lt;br /&gt;
  - interface: enp0s8&lt;br /&gt;
    threads: auto&lt;br /&gt;
    cluster-id: 98&lt;br /&gt;
    cluster-type: cluster_flow&lt;br /&gt;
    defrag: yes&lt;br /&gt;
  - interface: enp0s9&lt;br /&gt;
    threads: auto&lt;br /&gt;
    cluster-id: 99&lt;br /&gt;
    cluster-type: cluster_flow&lt;br /&gt;
    defrag: yes&lt;br /&gt;
&lt;br /&gt;
# PID-Datei&lt;br /&gt;
pid-file: /var/run/suricata.pid&lt;br /&gt;
&lt;br /&gt;
# Coredump-Einstellungen&lt;br /&gt;
coredump:&lt;br /&gt;
  max-dump: unlimited&lt;br /&gt;
&lt;br /&gt;
# Host-Modus&lt;br /&gt;
host-mode: auto&lt;br /&gt;
&lt;br /&gt;
# Unix-Befehlseingabe konfigurieren&lt;br /&gt;
unix-command:&lt;br /&gt;
  enabled: yes&lt;br /&gt;
  filename: /var/run/suricata-command.socket&lt;br /&gt;
&lt;br /&gt;
# Engine-Analyse-Einstellungen&lt;br /&gt;
engine-analysis:&lt;br /&gt;
  rules-fast-pattern: yes&lt;br /&gt;
  rules: yes&lt;br /&gt;
&lt;br /&gt;
# Defragmentierungseinstellungen&lt;br /&gt;
defrag:&lt;br /&gt;
  memcap: 32mb&lt;br /&gt;
  hash-size: 65536&lt;br /&gt;
  trackers: 65535&lt;br /&gt;
  max-frags: 65535&lt;br /&gt;
  prealloc: yes&lt;br /&gt;
  timeout: 60&lt;br /&gt;
&lt;br /&gt;
# Standardregelverzeichnis&lt;br /&gt;
default-rule-path: /etc/suricata/rules&lt;br /&gt;
&lt;br /&gt;
# Regel-Dateien&lt;br /&gt;
rule-files:&lt;br /&gt;
  - local.rules&lt;br /&gt;
&lt;br /&gt;
# Klassifikationsdatei&lt;br /&gt;
classification-file: /etc/suricata/classification.config&lt;br /&gt;
&lt;br /&gt;
# Referenzkonfigurationsdatei&lt;br /&gt;
reference-config-file: /etc/suricata/reference.config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Local Rules =&lt;br /&gt;
&lt;br /&gt;
*cat /etc/suricata/rules/local.rules&lt;br /&gt;
&lt;br /&gt;
 drop http any any -&amp;gt; any any (msg: &amp;quot;SQL Injection Attempt!&amp;quot;; flow:established,to_server; http.request_body; content: &amp;quot;OR 1=1&amp;quot;; sid:2;)&lt;br /&gt;
 drop dns any any -&amp;gt; any any (msg:&amp;quot;Kein Googlen&amp;quot;; dns.query; content:&amp;quot;google&amp;quot;; nocase; sid:3;)&lt;br /&gt;
 drop http any any -&amp;gt; any any (msg: &amp;quot;Possible SQL Injection attack (Contains singlequote POST DATA)&amp;quot;; flow:established,to_server; content:&amp;quot;%27&amp;quot;; nocase; http_client_body; sid:4;)&lt;br /&gt;
 drop http any any -&amp;gt; any any (msg: &amp;quot;Possible Command Injection attack (Contains semicolon POST DATA)&amp;quot;; flow:established,to_server; content:&amp;quot;%3B&amp;quot;; nocase; http_client_body; sid:5;)&lt;br /&gt;
&lt;br /&gt;
= Firewallanpassung =&lt;br /&gt;
;Ohne Return von der IPS, Hierzu müsste die IPS der Firewall nachgeschaltet sein.&lt;br /&gt;
* '''vim /usr/local/sbin/firewall'''&lt;br /&gt;
&lt;br /&gt;
 iptables -P FORWARD DROP&lt;br /&gt;
 iptables -A FORWARD -j NFQUEUE&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
==Start suricata==&lt;br /&gt;
&lt;br /&gt;
*'''suricata -D -q 0&lt;br /&gt;
&lt;br /&gt;
== Problematik ==&lt;br /&gt;
&lt;br /&gt;
* Dadurch, dass Suricata alle Pakete vom LAN zur DMZ behandelt, werden alle Pakete, die nicht ausdrücklich verworfen werden akzeptiert&lt;br /&gt;
* Wir müssen Suricata also so einstellen, dass es diese Pakete wieder iptables übergibt&lt;br /&gt;
&lt;br /&gt;
= NFQUEUE Repeat =&lt;br /&gt;
&lt;br /&gt;
* Damit Suricata die nicht gedroppten Pakete automatisch akzeptiert, sondern dies der Firewall überlässt, kann es diese Pakete markieren und zurück zu iptables schicken&lt;br /&gt;
* Markierungen folgen der Syntax $''MARK''/$'''MASK'''&lt;br /&gt;
&lt;br /&gt;
== iptables Version ==&lt;br /&gt;
* '''vim /usr/local/sbin/firewall'''&lt;br /&gt;
&lt;br /&gt;
 iptables -P FORWARD DROP&lt;br /&gt;
 iptables -A FORWARD -m mark ! --mark ''1''/'''1''' -j NFQUEUE&lt;br /&gt;
 iptables -A FORWARD -j LOG --log-prefix &amp;quot;iptables return from Suricata: &amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
== nftables Version ==&lt;br /&gt;
* '''vim ''/etc/nftables.conf'' '''&lt;br /&gt;
&lt;br /&gt;
 table inet filter {&lt;br /&gt;
 ...&lt;br /&gt;
 	chain forward {&lt;br /&gt;
 	mark and 1 != 1 queue&lt;br /&gt;
 	...&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''vim /etc/suricata/suricata.yml'''&lt;br /&gt;
&lt;br /&gt;
== Suricata Anpassung ==&lt;br /&gt;
 ...&lt;br /&gt;
 nfq:&lt;br /&gt;
   mode: repeat&lt;br /&gt;
   repeat-mark: ''1''&lt;br /&gt;
   repeat-mask: '''1'''&lt;br /&gt;
 ...&lt;br /&gt;
==Start suricata==&lt;br /&gt;
&lt;br /&gt;
*'''suricata -D -q 0'''&lt;br /&gt;
* Den Unterschied zwischen ''repeat'' und ''accept'' kann man mit Ping und SSH testen (falls SSH in der FORWARD Kette blockiert ist)&lt;br /&gt;
* Die Verstöße können folgendermaßen gesehen werden&lt;br /&gt;
*'''tail -fn0 ''/var/log/suricata/fast.log'' '''&lt;br /&gt;
&lt;br /&gt;
= Ersatz des IDS durch IPS =&lt;br /&gt;
* Die Standard ''.service''-Datei der Debian Installation stellt Suricata in den IDS-Modus&lt;br /&gt;
* Für den Start des IPS-Modus über systemd muss eine eigene ''.service''-Datei geschrieben werden&lt;br /&gt;
* '''cp ''/lib/systemd/system/suricata.service'' ''suricata-ips.service'' '''&lt;br /&gt;
* '''vim ''suricata-ips.service'' '''&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Suricata IDS/IDP daemon&lt;br /&gt;
 After=network.target network-online.target&lt;br /&gt;
 Requires=network-online.target&lt;br /&gt;
 Documentation=man:suricata(8) man:suricatasc(8)&lt;br /&gt;
 Documentation=https://suricata-ids.org/docs/&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 #Environment=LD_PRELOAD=/usr/lib/libtcmalloc_minimal.so.4&lt;br /&gt;
 PIDFile=/run/suricata.pid&lt;br /&gt;
 ExecStart=/usr/bin/suricata -D -q 0 -c /etc/suricata/suricata.yaml --pidfile /run/suricata.pid&lt;br /&gt;
 ExecReload=/usr/bin/suricatasc -c reload-rules ; /bin/kill -HUP $MAINPID&lt;br /&gt;
 ExecStop=/usr/bin/suricatasc -c shutdown&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 ProtectSystem=full&lt;br /&gt;
 ProtectHome=true&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
* '''cp ''suricata-ips.service'' ''/etc/systemd/system'' '''&lt;br /&gt;
* Wechsel der zu verwendeten ''.service''-Datei&lt;br /&gt;
* '''systemctl disable --now suricata.service'''&lt;br /&gt;
* '''systemctl enable --now suricata-ips.service'''&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
* https://docs.suricata.io/en/suricata-6.0.0/configuration/suricata-yaml.html#nfq&lt;br /&gt;
* https://medium.com/@mshulkhan/detection-attack-using-suricata-2-d93d423a435&lt;/div&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
</feed>