Hallo zusammen, wie kann ich Benutzer sperren und wieder freischalten?? d.H. Wie definiere ich die Regel meine Firewall soll dam Rechner mit der IP 192.168.1.1 den Internetzugang sperren und wie würde der Befehl heißen im diesen wieder zu erlauben??? Mfg Tobi
*** Tobias Korb (milla.killa@gmx.de) schrieb in suse-linux heute:
[...] Wie definiere ich die Regel meine Firewall soll dam Rechner mit der IP 192.168.1.1 den Internetzugang sperren
und wie würde der Befehl heißen im diesen wieder zu erlauben???
"man iptables". MfG Henning Hucke -- "Kooperation und Ruecksichtnahme ist Schwaeche", sagte der Topmanager, "Macher" und Erfolgsmensch, als er die letzten frei lebenden Paradies- voegel im Zuge der Rodungsarbeiten fuer seine neue Billiglohnfabrik in der dritten Welt toeten lies. (c) H.Hucke
Hallo Tobias, schau Dir doch mal ein paar Dokus zu iptables an bzw. such mal bei google :-) Die Regel würde für http Verkehr wie folgt lauten: iptables -I FORWARD -o $interne_Netzwerkkarte \ -p TCP -s 192.168.1.1 --sport 1024:65535 --dport 80 -j DROP Wenn Du einen auf iptables basierenden Server hast, der Router für die Clients spielt, verbietet diese Regel dem Client 192.168.1.1 über die interne Netzwerkkarte auf den Port 80 (TCP) eines externen Hosts zuzugreifen. iptables -I FORWARD -o $interne_Netzwerkkarte \ -p TCP -s 192.168.1.1 --sport 1024:65535 --dport 80 -j ACCEPT Diese Regel erlaubt das Ganze wieder. Gruß Sebastian
iptables -I FORWARD -o $interne_Netzwerkkarte \ -p TCP -s 192.168.1.1 --sport 1024:65535 --dport 80 -j DROP
Ich meinte nicht nur den Port 80 sondern alle Ports.... Aber ich denke das bekomme ich mit 1:65535 hin anstelle der 90 Das Problem ist die Firewall Regel funktioniert einfach überhaupt nicht :-((( Mfg Tobi ps gibt es eigentlich Unterschiede wenn ich so ein Befehl direkt in der Konsole eingebe???
Hallo Tobias, schreib einfach iptables -I FORWARD -o $interneNetzwerkkarte \ -p TCP -s 192.168.1.1 -j DROP bzw. -j ACCEPT auch wenn ich es dir bestimmt schonmal empfohlen habe: schau dir mal meine kleine firewallösung von www.wolfgarten.com an, ist ganz gut kommentiert, eventuell hilft dir das ja auch weiter! gruß sebastian
Hallo Tobias,
schreib einfach
iptables -I FORWARD -o $interneNetzwerkkarte \ -p TCP -s 192.168.1.1 -j DROP bzw. -j ACCEPT
das $interneNetzwerkkarte habe ich durch eth0 ersetzt: ich möchte den Befehl direkt in der Konsole eingeben können: iptables -I FORWARD -o eth0 \ -p TCP -s 192.168.1.1 -j DROP bzw. -j ACCEPT ich bekomme wenn ich den Befehl in die Konsole eingebe immer diese Fehlermeldung iptables: No chain/target/match by that name
Hallo Tobias, bei mir funzt die Regel ohne Probleme, machs mal ohne den Zeilenumbruch iptables -I FORWARD -o eth0 -p TCP -s 192.168.1.1 -j DROP Gruß Sebastian
On Thu, 13 Jun 2002, Axel Heinrici wrote:
On Monday, 10. June 2002 22:54, Sebastian Wolfgarten wrote:
schreib einfach
iptables -I FORWARD -o $interneNetzwerkkarte \ -p TCP -s 192.168.1.1 -j DROP bzw. -j ACCEPT
Sollte es nicht besser heißen -o $externeNetzwerkkarte ??
Naja, haengt davon ab, was inhalt der Variable §interneNetzwerkkarte ist. Aber Recht du hast, -o bezieht sich auf das Output-Device (ausgehendes Geraet). Gruss,\nConrad.\nErfurt
Hallo Axel, ja das stimmt, das muß auf die externe Netzwerkkarte verweisen. Gruß Sebastian
Tobias Korb schrieb:
Hallo zusammen,
wie kann ich Benutzer sperren und wieder freischalten??
[...]
und wie würde der Befehl heißen im diesen wieder zu erlauben???
http://www.gehrigal.de/computer/security/iptables/index.html http://www.fruehbrodt.org/artikel/netfilter.html http://www.pl-berichte.de/t_netzwerk/iptables.html MfG, Roman --
<> http://www.ec-jugend.de || http://www.thehope.de <><
participants (6)
-
Axel Heinrici
-
Conrad Gliem
-
Henning Hucke
-
Roman Langolf
-
Sebastian Wolfgarten
-
Tobias Korb