svn commit: r52840 - head/de_DE.ISO8859-1/books/handbook/firewalls
Bjoern Heidotting
bhd at FreeBSD.org
Mon Mar 4 19:10:04 UTC 2019
Author: bhd
Date: Mon Mar 4 19:10:03 2019
New Revision: 52840
URL: https://svnweb.freebsd.org/changeset/doc/52840
Log:
Update to r52831:
Document kernel compile options for ipfw
Introduce a dedicated interface
Use sysrc
Modified:
head/de_DE.ISO8859-1/books/handbook/firewalls/chapter.xml
Modified: head/de_DE.ISO8859-1/books/handbook/firewalls/chapter.xml
==============================================================================
--- head/de_DE.ISO8859-1/books/handbook/firewalls/chapter.xml Sat Mar 2 21:50:54 2019 (r52839)
+++ head/de_DE.ISO8859-1/books/handbook/firewalls/chapter.xml Mon Mar 4 19:10:03 2019 (r52840)
@@ -5,7 +5,7 @@
$FreeBSD$
$FreeBSDde: de-docproj/books/handbook/firewalls/chapter.xml,v 1.53 2012/04/30 16:15:52 bcr Exp $
- basiert auf: r52785
+ basiert auf: r52831
-->
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
@@ -1752,49 +1752,21 @@ block drop out quick on $ext_if from any to $martians<
bedeutet, dass kein angepasster Kernel benötigt wird, um
<application>IPFW</application> zu benutzen.</para>
- <indexterm>
- <primary>Kerneloptionen</primary>
- <secondary>IPFIREWALL</secondary>
- </indexterm>
-
- <indexterm>
- <primary>Kerneloptionen</primary>
- <secondary>IPFIREWALL_VERBOSE</secondary>
- </indexterm>
-
- <indexterm>
- <primary>Kerneloptionen</primary>
- <secondary>IPFIREWALL_VERBOSE_LIMIT</secondary>
- </indexterm>
-
- <indexterm>
- <primary><application>IPFW</application></primary>
- <secondary>Kerneloptionen</secondary>
- </indexterm>
-
<para>Wenn Sie eine statische Unterstützung für
<application>IPFW</application> in den Kernel kompilieren
- wollen, lesen Sie <xref linkend="kernelconfig"/>. Folgende
- Optionen können in der Kernelkonfigurationsdatei verwendet
- werden:</para>
+ wollen, lesen Sie <xref linkend="firewalls-ipfw-kernelconfig"/>.</para>
- <programlisting>options IPFIREWALL # enables IPFW
-options IPFIREWALL_VERBOSE # enables logging for rules with log keyword
-options IPFIREWALL_VERBOSE_LIMIT=5 # limits number of logged packets per-entry
-options IPFIREWALL_DEFAULT_TO_ACCEPT # sets default policy to pass what is not explicitly denied
-options IPDIVERT # enables NAT</programlisting>
-
<para>Um <application>IPFW</application> beim Systemstart zu
- aktivieren, fügen Sie folgende Zeile in
- <filename>/etc/rc.conf</filename> ein:</para>
+ aktivieren, fügen Sie <literal>firewall_enable="YES"</literal>
+ in <filename>/etc/rc.conf</filename> ein:</para>
- <programlisting>firewall_enable="YES"</programlisting>
+ <screen>&prompt.root; <userinput>sysrc firewall_enable="YES"</userinput></screen>
<para>Wenn Sie einen der von &os; zur Verfügung gestellten
Firewall-Profile benutzen möchten, fügen Sie eine weitere
Zeile hinzu, in der Sie das Profil bestimmen:</para>
- <programlisting>firewall_type="open"</programlisting>
+ <screen>&prompt.root; <userinput>sysrc firewall_type="open"</userinput></screen>
<para>Folgende Profile stehen zur Verfügung:</para>
@@ -1858,12 +1830,12 @@ options IPDIVERT # enables NAT</programlisting>
<literal>firewall_script</literal> auf
<filename>/etc/ipfw.rules</filename> gesetzt ist.</para>
- <programlisting>firewall_script="/etc/ipfw.rules"</programlisting>
+ <screen>&prompt.root; <userinput>sysrc firewall_script="/etc/ipfw.rules"</userinput></screen>
- <para>Die Protokollierung wird mit diesem Eintrag
+ <para>Die Protokollierung wird mit diesem Befehl
aktiviert:</para>
- <programlisting>firewall_logging="YES"</programlisting>
+ <screen>&prompt.root; <userinput>sysrc firewall_logging="YES"</userinput></screen>
<para>Es existiert keine Variable für
<filename>/etc/rc.conf</filename>, um die Protokollierung zu
@@ -1871,9 +1843,27 @@ options IPDIVERT # enables NAT</programlisting>
Verbindungsversuch zu begrenzen, legen Sie die Anzahl der
Einträge in <filename>/etc/sysctl.conf</filename> fest:</para>
- <programlisting>net.inet.ip.fw.verbose_limit=5</programlisting>
+ <screen>&prompt.root; <userinput>sysrc -f /etc/sysctl.conf net.inet.ip.fw.verbose_limit=<replaceable>5</replaceable></userinput></screen>
- <para>Nachdem Sie die Änderungen gespeichert haben, können Sie
+ <para>Um die Protokollierung über die spezielle Schnittstelle
+ <literal>ipfw0</literal> zu aktivieren, fügen Sie stattdessen
+ folgende Zeile in <filename>/etc/rc.conf</filename>
+ hinzu:</para>
+
+ <screen>&prompt.root; <userinput>sysrc firewall_logif="YES"</userinput></screen>
+
+ <para>Benutzen Sie dann <application>tcpdump</application>, um
+ zu sehen, was protokolliert wird:</para>
+
+ <screen>&prompt.root; <userinput>tcpdump -t -n -i ipfw0</userinput></screen>
+
+ <tip>
+ <para>Durch die Protokollierung entsteht kein Aufwand, es sei
+ denn, <application>tcpdump</application> wird an die
+ Schnittstelle angebunden.</para>
+ </tip>
+
+ <para>Nachdem Sie die Änderungen vorgenommen haben, können Sie
die Firewall starten. Um auch die Anzahl der
Protokoll-Nachrichten zu konfigurieren, setzen Sie mit
<command>sysctl</command> den gewünschten Wert:</para>
@@ -2424,7 +2414,7 @@ good_tcpo="22,25,37,53,80,443,110"</programlisting>
<para>Die eingehenden Regeln bleiben unverändert, mit Ausnahme
der letzten Regel, in der das
- <literal>via $pif</literal> entfert wird, um ein- und
+ <literal>via $pif</literal> entfernt wird, um ein- und
ausgehende Pakete prüfen zu können. Nach der letzten Regel
für ausgehende Pakete muss die <acronym>NAT</acronym>-Regel
folgen. Die Regel muss eine höhere Nummer als die letzte
@@ -2795,6 +2785,53 @@ ks="keep-state" # just too lazy to key this eac
&prompt.root; <userinput>ipfw -q add allow tcp from any to 192.0.2.11 53 out via tun0 setup keep-state</userinput>
&prompt.root; <userinput>ipfw -q add 00611 allow udp from any to 192.0.2.11 53 out via tun0 keep-state</userinput></screen>
</sect3>
+ </sect2>
+
+ <sect2 xml:id="firewalls-ipfw-kernelconfig">
+ <title><application>IPFW</application> Kerneloptionen</title>
+
+ <indexterm>
+ <primary>Kerneloptionen</primary>
+ <secondary>IPFIREWALL</secondary>
+ </indexterm>
+
+ <indexterm>
+ <primary>Kerneloptionen</primary>
+ <secondary>IPFIREWALL_VERBOSE</secondary>
+ </indexterm>
+
+ <indexterm>
+ <primary>Kerneloptionen</primary>
+ <secondary>IPFIREWALL_VERBOSE_LIMIT</secondary>
+ </indexterm>
+
+ <indexterm>
+ <primary><application>IPFW</application></primary>
+ <secondary>Kerneloptionen</secondary>
+ </indexterm>
+
+ <para>Um die Unterstützung für <application>IPFW</application>
+ statisch in den Kernel zu kompilieren, lesen Sie die
+ Anweisungen in <xref linkend="kernelconfig"/>. Die folgenden
+ Optionen können in der Kernelkonfigurationsdatei verwendet
+ werden:</para>
+
+ <programlisting>options IPFIREWALL # enables IPFW
+options IPFIREWALL_VERBOSE # enables logging for rules with log keyword to syslogd(8)
+options IPFIREWALL_VERBOSE_LIMIT=5 # limits number of logged packets per-entry
+options IPFIREWALL_DEFAULT_TO_ACCEPT # sets default policy to pass what is not explicitly denied
+options IPFIREWALL_NAT # enables in-kernel NAT support
+options IPFIREWALL_NAT64 # enables in-kernel NAT64 support
+options IPFIREWALL_NPTV6 # enables in-kernel IPv6 NPT support
+options IPFIREWALL_PMOD # enables protocols modification module support
+options IPDIVERT # enables NAT through natd(8)</programlisting>
+
+ <note>
+ <para><application>IPFW</application> kann auch als
+ Kernelmodul geladen werden: Die oben genannten Optionen
+ werden standardmäßig als Module erstellt, oder können zur
+ Laufzeit über Parameter festgelegt werden.</para>
+ </note>
</sect2>
</sect1>
More information about the svn-doc-head
mailing list