jkois 2012-01-08 15:50:48 UTC
FreeBSD German Documentation Repository
Modified files:
books/handbook/firewalls chapter.sgml
Log:
- Massenweise Markupänderungen.
- Umformulierungen, Entityfehler, Tippfehler
Revision Changes Path
1.46 +227 -252 de-docproj/books/handbook/firewalls/chapter.sgml
Index: chapter.sgml
===================================================================
RCS file: /home/cvs/de-docproj/books/handbook/firewalls/chapter.sgml,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -I$FreeBSDde.*$ -r1.45 -r1.46
--- chapter.sgml 1 Jan 2012 16:31:58 -0000 1.45
+++ chapter.sgml 8 Jan 2012 15:50:48 -0000 1.46
@@ -2832,8 +2832,7 @@
nächste Paket der bidirektionalen Konversation in der
Sitzung vorgesehen ist. Im Falle, dass ein Paket die
(dynmische) Regel nicht erfüllt, wird das Paket gegen
- die nächste Regel im Regelwerk geprüft.
- </para>
+ die nächste Regel im Regelwerk geprüft.</para>
<para>Dynamische Regeln sind fuuml;r einem sogenannten
<foreignphrase>SYN-flood</foreignphrase> Angriff
@@ -2941,7 +2940,7 @@
<para>Die Syntax des Scriptes hier ist konsistent mit der
Syntax von &man.sh.1;, &man.csh.1; und &man.tcsh.1;. Felder,
die symbolisch substituiert werden, haben das Präfix
- &dollar (Dollarzeichen). Symbolische Felder haben dieses
+ $ (Dollarzeichen). Symbolische Felder haben dieses
$-Praefix nicht. Der Wert, mit dem das symbolische
Feld belegt wird, muss in
<quote>doppelten Anführungsstrichen</quote>
@@ -2967,37 +2966,32 @@
################### End of example ipfw rules script ############
</programlisting>
- <para>
- Dies komplettiert den Anteil, der zu beachten ist. Die Regeln
- an sich sind in diesem Beispiel unwichtig, wichtig ist, wie
- symbolische Substitution verwendet wird.</para>
+ <para>Dies komplettiert den Anteil, der zu beachten ist. Die Regeln
+ an sich sind in diesem Beispiel unwichtig, wichtig ist, wie
+ symbolische Substitution verwendet wird.</para>
<para>Wenn oben stehendes Beispiel in der Datei
<filename>/etc/ipfw.rules</filename> angelegt gewesen
wäre, könnten alle Regeln durch Ausführung
des folgenden Befehls neu geladen werden:</para>
- <screen>
- &prompt.root; <userinput>sh /etc/ipfw.rules</userinput>
- </screen>
+ <screen>&prompt.root; <userinput>sh /etc/ipfw.rules</userinput></screen>
<para>Es ist möglich, die Datei
<filename>/etc/ipfw.rules</filename> an jedem beliebigen Ort
zu speichern und beliebig zu benennen.</para>
<para>Derselbe Effekt wie durch ausführen der Datei
- könnte erreicht werden, indem man diese Kommandos manuell
- ausführt.</para>
+ könnte erreicht werden, indem man diese Kommandos manuell
+ ausführt.</para>
- <screen>
- &prompt.root; <userinput>ipfw -q -f flush</userinput>
- &prompt.root; <userinput>ipfw -q add check-state</userinput>
- &prompt.root; <userinput>ipfw -q add deny all from any to any frag</userinput>
- &prompt.root; <userinput>ipfw -q add deny tcp from any to any established</userinput>
- &prompt.root; <userinput>ipfw -q add allow tcp from any to any 80 out via tun0 setup keep-state</userinput>
- &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>
+ <screen>&prompt.root; <userinput>ipfw -q -f flush</userinput>
+&prompt.root; <userinput>ipfw -q add check-state</userinput>
+&prompt.root; <userinput>ipfw -q add deny all from any to any frag</userinput>
+&prompt.root; <userinput>ipfw -q add deny tcp from any to any established</userinput>
+&prompt.root; <userinput>ipfw -q add allow tcp from any to any 80 out via tun0 setup keep-state</userinput>
+&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>
<sect3>
@@ -3023,8 +3017,7 @@
Kommunikation mit dem Betriebssystem. Die Firewall
muss so eingestellt sein, dass sie ungehinderten
Datenverkehr dieser speziellen, intern genutzten Pakete
- zulässt.
- </para>
+ zulässt.</para>
<para>Die Regeln, die Zugriff auf eingehene und ausgehende
Verbindungen regeln, autorisieren und kontrollieren,
@@ -3053,8 +3046,7 @@
häufigsten zu nutzenden Regeln vor seltener genutzten
stehen. Die Abschnitte selbst sollten mit einer letzten
Regel, die alle Pakete blockiert und protokolliert,
- terminiert werden.
- </para>
+ terminiert werden.</para>
<para>Im folgenden Beispiel enthält der Abschnitt mit
Regeln für ausgehenden Datenverkehr
@@ -3485,8 +3477,8 @@
<para>Angenommen, dass analog umgekehrt zu dem vorher
diskutierten Fall auf dem Host, auf dem die Firewall
- betrieben wird, ein Apache Server betrieben werde und
- dass gleichzeitig erwuuml;nscht sei, dass Personen
+ betrieben wird, ein Apache Server betrieben wird und
+ dass gleichzeitig erwuuml;nscht ist, dass Personen
aus dem öffentlichen Internet auf Webseiten, die durch
diesem www-Server gehostet werden, zugreifen können.
Eine so eine Sitzung beginnende Anfrage löst
@@ -3509,232 +3501,215 @@
Regel <literal>500</literal> zur <acronym>NAT</acronym>
zugeführt und danach über die Schnittstelle zum
öffentlichen Internet nach außen geroutet.</para>
+<!-- Gecheckt ab hier bis zum Ende der Datei - jkois - 2012-01-08 -->
+ <para>Beispiel 1 für einen Regelsatz:</para>
- <para>Beispiel #1:</para>
+ <programlisting>#!/bin/sh
+cmd="ipfw -q add"
+skip="skipto 500"
+pif=rl0
+ks="keep-state"
+good_tcpo="22,25,37,43,53,80,443,110,119"
+
+ipfw -q -f flush
+
+$cmd 002 allow all from any to any via xl0 # exclude LAN traffic
+$cmd 003 allow all from any to any via lo0 # exclude loopback traffic
+
+$cmd 100 divert natd ip from any to any in via $pif
+$cmd 101 check-state
+
+# Authorized outbound packets
+$cmd 120 $skip udp from any to xx.168.240.2 53 out via $pif $ks
+$cmd 121 $skip udp from any to xx.168.240.5 53 out via $pif $ks
+$cmd 125 $skip tcp from any to any $good_tcpo out via $pif setup $ks
+$cmd 130 $skip icmp from any to any out via $pif $ks
+$cmd 135 $skip udp from any to any 123 out via $pif $ks
+
+
+# Deny all inbound traffic from non-routable reserved address spaces
+$cmd 300 deny all from 192.168.0.0/16 to any in via $pif #RFC 1918 private IP
+$cmd 301 deny all from 172.16.0.0/12 to any in via $pif #RFC 1918 private IP
+$cmd 302 deny all from 10.0.0.0/8 to any in via $pif #RFC 1918 private IP
+$cmd 303 deny all from 127.0.0.0/8 to any in via $pif #loopback
+$cmd 304 deny all from 0.0.0.0/8 to any in via $pif #loopback
+$cmd 305 deny all from 169.254.0.0/16 to any in via $pif #DHCP auto-config
+$cmd 306 deny all from 192.0.2.0/24 to any in via $pif #reserved for docs
+$cmd 307 deny all from 204.152.64.0/23 to any in via $pif #Sun cluster
+$cmd 308 deny all from 224.0.0.0/3 to any in via $pif #Class D & E multicast
+
+# Authorized inbound packets
+$cmd 400 allow udp from xx.70.207.54 to any 68 in $ks
+$cmd 420 allow tcp from any to me 80 in via $pif setup limit src-addr 1
+
+
+$cmd 450 deny log ip from any to any
+
+# This is skipto location for outbound stateful rules
+$cmd 500 divert natd ip from any to any out via $pif
+$cmd 510 allow ip from any to any
+
+######################## end of rules ##################</programlisting>
+
+ <para>Das folgende Beispiel ist praktisch identisch mit dem ersten
+ Regelsatz. Allerdings wurden die Regel umfassend kommentiert und
+ umgeschrieben, damit sie für weniger erfahrene Benutzer
+ leichter verständlich werden.</para>
+
+ <para>Beispiel 2 für einen Regelsatz:</para>
+
+ <programlisting>#!/bin/sh
+################ Start of IPFW rules file ###############################
+# Flush out the list before we begin.
+ipfw -q -f flush
+
+# Set rules command prefix
+cmd="ipfw -q add"
+skip="skipto 800"
+pif="rl0" # public interface name of NIC
+ # facing the public Internet
- <programlisting>
- #!/bin/sh
- cmd="ipfw -q add"
- skip="skipto 500"
- pif=rl0
- ks="keep-state"
- good_tcpo="22,25,37,43,53,80,443,110,119"
-
- ipfw -q -f flush
-
- $cmd 002 allow all from any to any via xl0 # ohne LAN traffic
- $cmd 003 allow all from any to any via lo0 # ohne loopback traffic
-
- $cmd 100 divert natd ip from any to any in via $pif
- $cmd 101 check-state
-
- # Authorisierte Pakete nach außen:
- $cmd 120 $skip udp from any to xx.168.240.2 53 out via $pif $ks
----------------------------------------------
Diff block truncated. (Max lines = 200)
----------------------------------------------
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-cvs-doc" in the body of the message
Received on Sun 08 Jan 2012 - 16:51:04 CET