Last modified by Tobias Wintrich on 2022/10/28 12:30

From version 8.1
edited by Tobias Wintrich
on 2022/10/28 10:02
Change comment: There is no comment for this version
To version 12.1
edited by Tobias Wintrich
on 2022/10/28 10:15
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,5 +1,7 @@
1 1  Das RangeeOS stellt keine grafische Benutzeroberfläche zur Erstellung und Verwaltung von Firewall Regeln bereit. Auf Wunsch können aber beliebige Regeln über das Linux Kommandozeilen Tool //**iptables **//erstellt und über das Skripte Modul auch auf verschiedene Geräte übertragen werden.
2 2  
3 +{{toc/}}
4 +
3 3  = Voraussetzung =
4 4  
5 5  Auf dem RangeeOS Client muss das Softwaremodul **scripts **in zur Firmware passender Version installiert sein.
... ... @@ -12,6 +12,17 @@
12 12  
13 13  Hier finden Sie verschiedene Regeln um nur definierten, eingehenden Datenverkehr zum RangeeOS auf Netzwerkebene zu erlauben . Das Blockieren ausgehender Verbindungen auf Clientseite wird nicht empfohlen.
14 14  
17 +In folgenden Beispielen werden diese Parameter von iptables verwendet:
18 +
19 +{{{-A => --append
20 +-p => --protocol
21 +-s => --source
22 +-m => --match
23 +-j => --jump
24 +-F => --flush
25 +-P => --policy
26 +--dport => --destination-ports}}}
27 +
15 15  {{info}}
16 16  Weitere Informationen zur Verwendung von iptables finden Sie hier:
17 17  
... ... @@ -21,35 +21,39 @@
21 21  
22 22  == Standard verwerfen ==
23 23  
37 +**Entfernt alle bestehenden Regeln:**
38 +
39 +{{{iptables --flush}}}
40 +
24 24  **Block sämtliche eingehenden Pakete die nicht explizit erlaubt sind:**
25 25  
26 -{{{iptables -P INPUT DROP}}}
43 +{{{iptables --policy INPUT DROP}}}
27 27  
28 28  **Erlaubt das Aufrechterhalten von Aufgebauten Verbindungen (RDP, ICA, VMwareView...):**
29 29  
30 -{{{iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT}}}
47 +{{{iptables --append INPUT --match state --state RELATED,ESTABLISHED --jump ACCEPT}}}
31 31  
32 32  == Port / Protokoll / Netzwerk erlauben ==
33 33  
34 34  **Erlaubt Kontakt zur Kommbox per Browser / TCMS auf Port 443 TCP von dem 24er Subnetz 192.168.255.0/24:**
35 35  
36 -{{{iptables -A INPUT -p tcp --dport 443 -s 192.168.255.0/24 -j ACCEPT}}}
53 +{{{iptables --append INPUT --protocol tcp --dport 443 --source 192.168.255.0/24 --jump ACCEPT}}}
37 37  
38 38  **Erlaubt SSH zum Client auf Port 22 TCP von einzelner IP 192.168.255.56/32:**
39 39  
40 -{{{iptables -A INPUT -p tcp --dport 22 -s 192.168.255.56/32 -j ACCEPT}}}
57 +{{{iptables --append INPUT --protocol tcp --dport 22 --source 192.168.255.56/32 --jump ACCEPT}}}
41 41  
42 42  **Erlaubt VNC zum Client auf Port 5900 TCP vom 16er Subnetz 192.168.0.0/16:**
43 43  
44 -{{{iptables -A INPUT -p tcp --dport 5900 -s 192.168.0.0/16 -j ACCEPT}}}
61 +{{{iptables --append INPUT --protocol tcp --dport 5900 --source 192.168.0.0/16 --jump ACCEPT}}}
45 45  
46 46  **Für WebVNC aus Kommbox oder TCMS zusätzlich Port 80 TCP vom 16er Subnetz 192.168.0.0/16:**
47 47  
48 -{{{iptables -A INPUT -p tcp --dport 80 -s 192.168.0.0/16 -j ACCEPT}}}
65 +{{{iptables --append INPUT --protocol tcp --dport 80 --source 192.168.0.0/16 --jump ACCEPT}}}
49 49  
50 50  **Erlaubt ICMP (Ping) von überall**
51 51  
52 -{{{iptables -A INPUT -p icmp -j ACCEPT}}}
69 +{{{iptables --append INPUT --protocol icmp --jump ACCEPT}}}
53 53  
54 54  = Skript anlegen =
55 55  
... ... @@ -66,19 +66,20 @@
66 66  Vergeben Sie die von Ihnen benötigen Regeln (eine je Zeile) in das Feld **Skript **ein. Ein Skript mit allen Regeln aus den Beispielen diese Seite sieht so aus:
67 67  
68 68  {{{#Zeilen welche mit '#' beginnen werden nicht ausgewertet und können als Kommentare verwendet werden
69 -iptables -P INPUT DROP
70 -iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
71 -iptables -A INPUT -p tcp --dport 443 -s 192.168.255.0/24 -j ACCEPT
86 +iptables --flush
87 +iptables --policy INPUT DROP
88 +iptables --append INPUT --match state --state RELATED,ESTABLISHED --jump ACCEPT
89 +iptables --append INPUT --protocol tcp --dport 443 --source 192.168.255.0/24 --jump ACCEPT
72 72  
73 73  # Erlaube SSH Admin PC
74 -iptables -A INPUT -p tcp --dport 22 -s 192.168.255.56/32 -j ACCEPT
92 +iptables --append INPUT --protocol tcp --dport 22 --source 192.168.255.56/32 --jump ACCEPT
75 75  
76 76  # Erlaube VNC
77 -iptables -A INPUT -p tcp --dport 5900 -s 192.168.0.0/16 -j ACCEPT
78 -iptables -A INPUT -p tcp --dport 80 -s 192.168.0.0/16 -j ACCEPT
95 +iptables --append INPUT --protocol tcp --dport 5900 --source 192.168.0.0/16 --jump ACCEPT
96 +iptables --append INPUT --protocol tcp --dport 80 --source 192.168.0.0/16 --jump ACCEPT
79 79  
80 80  # Erlaube PING
81 -iptables -A INPUT -p icmp -j ACCEPT}}}
99 +iptables --append INPUT --protocol icmp --jump ACCEPT}}}
82 82  
83 83  Zusätzlich zum Skript sollten (* = müssen) folgende Optionen in der Verbindung definiert werden:
84 84