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

From version 7.1
edited by Tobias Wintrich
on 2022/10/28 09:59
Change comment: There is no comment for this version
To version 16.1
edited by Tobias Wintrich
on 2022/10/28 10:29
Change comment: Neuen Anhang RangeeOS-Firewall.png hochladen

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.
... ... @@ -21,35 +21,39 @@
21 21  
22 22  == Standard verwerfen ==
23 23  
26 +**Entfernt alle bestehenden Regeln:**
27 +
28 +{{{iptables --flush}}}
29 +
24 24  **Block sämtliche eingehenden Pakete die nicht explizit erlaubt sind:**
25 25  
26 -{{{iptables -P INPUT DROP}}}
32 +{{{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}}}
36 +{{{iptables --append INPUT --match state --state RELATED,ESTABLISHED --jump ACCEPT}}}
31 31  
32 32  == Port / Protokoll / Netzwerk erlauben ==
33 33  
34 -**Erlaubt Kontakt zur Kommbox per Browser / TCMS auf Port 443 TCP von einem 24er Subnetz:**
40 +**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}}}
42 +{{{iptables --append INPUT --protocol tcp --destination-port 443 --source 192.168.255.0/24 --jump ACCEPT}}}
37 37  
38 -**Erlaubt SSH zum Client auf Port 22 TCP von einzelner IP**
44 +**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}}}
46 +{{{iptables --append INPUT --protocol tcp --destination-port 22 --source 192.168.255.56/32 --jump ACCEPT}}}
41 41  
42 -**Erlaubt VNC zum Client auf Port 5900 TCP von 16er Subnetz**
48 +**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 ACCEPT}}}
50 +{{{iptables --append INPUT --protocol tcp --destination-port 5900 --source 192.168.0.0/16 --jump ACCEPT}}}
45 45  
46 -**Für WebVNC aus Kommbox oder TCMS zusätzlich Port 80 TCP von 16er Subnetz:**
52 +**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}}}
54 +{{{iptables --append INPUT --protocol tcp --destination-port 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 -s 0/0 -j ACCEPT}}}
58 +{{{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
75 +iptables --flush
76 +iptables --policy INPUT DROP
77 +iptables --append INPUT --match state --state RELATED,ESTABLISHED --jump ACCEPT
78 +iptables --append INPUT --protocol tcp --destination-port 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
81 +iptables --append INPUT --protocol tcp --destination-port 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 ACCEPT
78 -iptables -A INPUT -p tcp --dport 80 -s 192.168.0.0/16 -j ACCEPT
84 +iptables --append INPUT --protocol tcp --destination-port 5900 --source 192.168.0.0/16 --jump ACCEPT
85 +iptables --append INPUT --protocol tcp --destination-port 80 --source 192.168.0.0/16 --jump ACCEPT
79 79  
80 80  # Erlaube PING
81 -iptables -A INPUT -p icmp -s 0/0 -j ACCEPT}}}
88 +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  
... ... @@ -85,9 +85,5 @@
85 85  |(% style="width:160px" %)Verbindungsname *|(% style="width:1346px" %)Frei wählbarer Anzeigename der Verbindung
86 86  |(% style="width:160px" %)Als root ausführen *|(% style="width:1346px" %)an - Führt das Skript mit den benötigten rechten aus
87 87  |(% style="width:160px" %)Automatischer Start|(% style="width:1346px" %)an - Sorgt dafür, dass die Firewall beim Start des geräts aktiviert wird
88 -|(% style="width:160px" %)Desktop-Verknüpfung erstellen|(% style="width:1346px" %)aus
89 -|(% style="width:160px" %)Verknüpfung im Startmenü erstellen|(% style="width:1346px" %)aus
90 -
91 -[[image:RangeeOS-Firewall.png||height="446" width="600"]]
92 -
93 -Das fertige Skript wird nun bei jedem Systemstart ausgeführt und wendet die definierten Regeln an. Das Skript kann beliebig per TCMS Konfiguration auf andere Geräte verteilt werden.
95 +|(% style="width:160px" %)Desktop-Verknüpfung erstellen
96 +~)~)~)
RangeeOS-Firewall.png
Size
... ... @@ -1,1 +1,1 @@
1 -193.2 KB
1 +202.1 KB
Content