Fehler bei FIrewall

User avatar
h4zebust3r90
Posts: 6
Joined: Mon 18. Dec 2017, 11:30

Fehler bei FIrewall

Post by h4zebust3r90 »

Hallo,

aus einem mir unbekannten Grund kann ich die alten FIrewall Regeln vn Keyhelp nicht mehr herstellen:

Image

Ich kann leider keinerlei Fehler erkennen - der Inhalt der betroffenen Datei ist:

Code: Select all


#
# Generated by KeyHelp on 18:46:08 - February 03 2018
#

*filter

# chains
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:Allow - [0:0]
:Always - [0:0]
:Banned - [0:0]
:Bogus - [0:0]
:Friend - [0:0]
:fail2ban - [0:0]

# chain: INPUT
-A INPUT -j Bogus
-A INPUT -j Always
-A INPUT -j Banned
-A INPUT -j fail2ban
-A INPUT -j Allow

# chain: FORWARD
-A FORWARD -j Bogus
-A FORWARD -j Always
-A FORWARD -j Banned
-A FORWARD -j Allow

# chain: OUTPUT
# - no content -

# chain: Allow
-A Allow --protocol icmp --match icmp --icmp-type 8 -j Friend
-A Allow --protocol icmp --match icmp --match limit --icmp-type any --limit 1/sec -j ACCEPT
-A Allow --protocol icmp --match icmp --icmp-type any -j DROP
-A Allow --in-interface lo -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 53 -j ACCEPT
-A Allow --protocol udp --match udp --destination-port 53 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 20 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 21 -j ACCEPT
-A Allow --protocol tcp --match multiport --destination-ports 30000:30500 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 22 -j DROP
-A Allow --protocol tcp --match tcp --destination-port 80 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 443 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 25 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 587 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 110 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 143 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 993 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 995 -j ACCEPT
-A Allow -j REJECT --reject-with icmp-port-unreachable

# chain: Always
-A Always --in-interface lo -j ACCEPT
-A Always --match state --state RELATED,ESTABLISHED -j ACCEPT
-A Always -j Friend

# chain: Banned
# - no content -

# chain: Bogus
-A Bogus --protocol tcp --match tcp --tcp-flags FIN,SYN FIN,SYN -j DROP
-A Bogus --protocol tcp --match tcp --tcp-flags SYN,RST SYN,RST -j DROP
-A Bogus --source 169.254.0.0/16 -j DROP
-A Bogus --source 172.16.0.0/12 -j DROP
-A Bogus --source 192.0.2.0/24 -j DROP
-A Bogus --source 192.168.0.0/16 -j DROP
-A Bogus --source 10.0.0.0/8 -j DROP
-A Bogus --source 127.0.0.0/8 ! --in-interface lo -j DROP

# chain: Friend
-A Friend -j RETURN

# chain: fail2ban
# - no content -

COMMIT
# Completed on 18:46:08 - February 03 2018


Infos zum System:

debian-8.0-x86_64-minimal
Apache/2.4.10 (Debian)
PHP: 5.6.33-0+deb8u1
MYSQL: 5.5.5-10.0.34-MariaDB-1~jessie
ProFTPD 1.3.5
phpMyAdmin 4.7.5
Roundcube 1.3.3

KEYHELP: 17.2.1 (Build 1286)

Hat jemand einen Rat für mich? Ich wäre sehr froh wenn die Firewall wieder gehen würde... ist so gar nicht auszuhalten ..
Skype: alexander.mer | Discord: h4zebust3r#1082 | E-Mail: alexander.m@maralex.site
---
www.maralex.site
nikko
Posts: 914
Joined: Fri 15. Apr 2016, 16:11

Re: Fehler bei FIrewall

Post by nikko »

Erstelle mal eine neue Vorlage (Entwurf) und importiere sie dann. Das dürfte funktionieren.
The software said: Requires Win Vista®, 7®, 8® or better. And so I installed Linux.
User avatar
h4zebust3r90
Posts: 6
Joined: Mon 18. Dec 2017, 11:30

Re: Fehler bei FIrewall

Post by h4zebust3r90 »

Danke für deine Hiofe.

Ich bin jetzt auf > Entwurf hinzufügen > Eigene Regeln Importieren > da die alten Regelm rein .. gespeichert .. passt ..

http://prntscr.com/i9szq5

Danach gehe ich dann wieder auf Firewall und sehe dass:

http://prntscr.com/i9szvi

Hilfe ...
Skype: alexander.mer | Discord: h4zebust3r#1082 | E-Mail: alexander.m@maralex.site
---
www.maralex.site
User avatar
Martin
Posts: 984
Joined: Wed 20. Jan 2016, 00:43

Re: Fehler bei FIrewall

Post by Martin »

Hallo,

was genau steht denn in Zeile 79?
Viele Grüße,
Martin
User avatar
h4zebust3r90
Posts: 6
Joined: Mon 18. Dec 2017, 11:30

Re: Fehler bei FIrewall

Post by h4zebust3r90 »

Huhu, sorry heute stressiger Tag,

COMMIT steht in der betreffenden Zeile. Hast du einen Tipp?

Oh Mann ..

lg
Skype: alexander.mer | Discord: h4zebust3r#1082 | E-Mail: alexander.m@maralex.site
---
www.maralex.site
User avatar
h4zebust3r90
Posts: 6
Joined: Mon 18. Dec 2017, 11:30

Re: Fehler bei FIrewall

Post by h4zebust3r90 »

Niemand? ..
Skype: alexander.mer | Discord: h4zebust3r#1082 | E-Mail: alexander.m@maralex.site
---
www.maralex.site
User avatar
Alexander
Keyweb AG
Posts: 4449
Joined: Wed 20. Jan 2016, 02:23

Re: Fehler bei FIrewall

Post by Alexander »

Die oben von dir geposteten Regeln konnte ich ohne Probleme importieren und anschließend einspielen, auch unter Debian 8.

Wenn du die Regeln von oben kopierst und via KeyHelp importierst, dann erhältst du beim Anwenden immer noch den Fehler?

Funktioniert das Rückspielen der Standard-Regeln ("Entwurf hinzufügen" -> "Benutze existierende Regeln: Empfohlene Regeln")?
Bzw. das Einspielen eines leeren Regelsatzes?
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
nikko
Posts: 914
Joined: Fri 15. Apr 2016, 16:11

Re: Fehler bei FIrewall

Post by nikko »

Ich glaube, ich konnte gestern den Fehler in ähnlicher Weise reproduzieren. Wenn ich es nochmal schaffe, bekommst du - Alexander -
ein Ticket mit der entsprechenden Maschine.
The software said: Requires Win Vista®, 7®, 8® or better. And so I installed Linux.
nikko
Posts: 914
Joined: Fri 15. Apr 2016, 16:11

Re: Fehler bei FIrewall

Post by nikko »

@Alexander - hast eine Mail von mir mit dem Betreff "Problem Firewall Regel Keyhelp Forum" (kein Ticket)
The software said: Requires Win Vista®, 7®, 8® or better. And so I installed Linux.
User avatar
Alexander
Keyweb AG
Posts: 4449
Joined: Wed 20. Jan 2016, 02:23

Re: Fehler bei FIrewall

Post by Alexander »

Super, danke für deine Mühen, ich schaue mir das dann einmal an.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Fiesi
Posts: 155
Joined: Wed 15. Nov 2017, 12:32

Re: Fehler bei FIrewall

Post by Fiesi »

Gibts denn wegen den Commit schon eine Lösung?
Stehe jetzt gerade selber vor den Problem ;)

Code: Select all

Fehler:
Beim Anwenden des Regelsatz "Firewall" ist ein Fehler aufgetreten.

iptables-restore: line 79 failed
Ich habe einfach einen neuen Entwurf angelegt mit "Empfohlene Regeln".

Export der Regeln:

Code: Select all

#
# Generated by KeyHelp on 10:06:55 - July 02 2018
#

*filter

# chains
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:Allow - [0:0]
:Always - [0:0]
:Banned - [0:0]
:Bogus - [0:0]
:Friend - [0:0]
:fail2ban - [0:0]

# chain: INPUT
-A INPUT -j Bogus
-A INPUT -j Always
-A INPUT -j Banned
-A INPUT -j fail2ban
-A INPUT -j Allow

# chain: FORWARD
-A FORWARD -j Bogus
-A FORWARD -j Always
-A FORWARD -j Banned
-A FORWARD -j Allow

# chain: OUTPUT
# - no content -

# chain: Allow
-A Allow --protocol icmp --match icmp --icmp-type 8 -j Friend
-A Allow --protocol icmp --match icmp --match limit --icmp-type any --limit 1/sec -j ACCEPT
-A Allow --protocol icmp --match icmp --icmp-type any -j DROP
-A Allow --in-interface lo -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 53 -j ACCEPT
-A Allow --protocol udp --match udp --destination-port 53 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 20 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 21 -j ACCEPT
-A Allow --protocol tcp --match multiport --destination-ports 30000:30500 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 22 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 80 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 443 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 25 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 587 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 110 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 143 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 993 -j ACCEPT
-A Allow --protocol tcp --match tcp --destination-port 995 -j ACCEPT
-A Allow -j REJECT --reject-with icmp-port-unreachable

# chain: Always
-A Always --in-interface lo -j ACCEPT
-A Always --match state --state RELATED,ESTABLISHED -j ACCEPT
-A Always -j Friend

# chain: Banned
# - no content -

# chain: Bogus
-A Bogus --protocol tcp --match tcp --tcp-flags FIN,SYN FIN,SYN -j DROP
-A Bogus --protocol tcp --match tcp --tcp-flags SYN,RST SYN,RST -j DROP
-A Bogus --source 169.254.0.0/16 -j DROP
-A Bogus --source 172.16.0.0/12 -j DROP
-A Bogus --source 192.0.2.0/24 -j DROP
-A Bogus --source 192.168.0.0/16 -j DROP
-A Bogus --source 10.0.0.0/8 -j DROP
-A Bogus --source 127.0.0.0/8 ! --in-interface lo -j DROP

# chain: Friend
-A Friend -j RETURN

# chain: fail2ban
# - no content -

COMMIT
# Completed on 10:06:55 - July 02 2018
P.s.:
Ich würde es nicht schlecht finden, wenn KeyHelp viell. zwischenzeitlich die Regeln vergleicht falls per "console" oder ähnliches Regeln dazugekommen sind. So könnte man per KeyHelp diese dann auch mal bearbeiten ohne gleich per SSH zu connecten.
Also das KeyHelp viell immer die Aktuellen Regeln läde, die gerade Aktiv sind ;)
Ein Systemadministrator schläft nicht. Er root! :)
nikko
Posts: 914
Joined: Fri 15. Apr 2016, 16:11

Re: Fehler bei FIrewall

Post by nikko »

Das Problem ist meines Erachtens nach abgestellt (zumindest nicht mehr aufgetreten bei mir).

Zum Vergleichen musst du den aktiven Regelsatz importieren. Im Grunde aollte eine vollständige Bearbeitung ohne SSH möglich sein. (? @Martin)
The software said: Requires Win Vista®, 7®, 8® or better. And so I installed Linux.
User avatar
Alexander
Keyweb AG
Posts: 4449
Joined: Wed 20. Jan 2016, 02:23

Re: Fehler bei FIrewall

Post by Alexander »

Grüße,

ja der Fehler sollte eigentlich nicht mehr auftreten, da die Ursache dafür seit dem März Update gefixt ist.

Ich gehe davon aus du verwendest die aktuelle KeyHelp Version 18.1.1?

---

Tatsächlich erhielt ich beim Einspielen deiner Regeln jetzt auch besagte Fehlermeldung, allerdings nur ein einziges Mal, nachdem ich dann den Standardregelsatz importiert habe und danach noch einmal versucht habe, deine Regeln zu importieren, war es leider nicht mehr reproduzierbar.

---
Fiesi wrote:Ich würde es nicht schlecht finden, wenn KeyHelp viell. zwischenzeitlich die Regeln vergleicht falls per "console" oder ähnliches Regeln dazugekommen sind. So könnte man per KeyHelp diese dann auch mal bearbeiten ohne gleich per SSH zu connecten.
Also das KeyHelp viell immer die Aktuellen Regeln läde, die gerade Aktiv sind
Problem an der Sache ist, dass zum Einlesen der Regeln, root Berechtigungen Voraussetzung sind - Die KeyHelp Oberfläche läuft (zurecht :) ) nicht direkt mit root Berechtigungen sondern nutzt hierfür den Umweg über einen Cronjob, der dann Arbeiten für die root Berechtigungen notwendig sind ausführt. Jetzt könnte man natürlich hingehen und jede Minute die KeyHelp Datenbank mit den aktuellen iptables regeln synchen, aber das würde sich irgendwie falsch anfühlen.
Stattdessen muss man leider aktuell auf die Firewall Seite -> Button "Einstellungen" -> Checkbox "aktuelle Regeln neu laden" klicken.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Fiesi
Posts: 155
Joined: Wed 15. Nov 2017, 12:32

Re: Fehler bei FIrewall

Post by Fiesi »

Alexander wrote: Mon 2. Jul 2018, 13:44 Grüße,

ja der Fehler sollte eigentlich nicht mehr auftreten, da die Ursache dafür seit dem März Update gefixt ist.

Ich gehe davon aus du verwendest die aktuelle KeyHelp Version 18.1.1?

---

Tatsächlich erhielt ich beim Einspielen deiner Regeln jetzt auch besagte Fehlermeldung, allerdings nur ein einziges Mal, nachdem ich dann den Standardregelsatz importiert habe und danach noch einmal versucht habe, deine Regeln zu importieren, war es leider nicht mehr reproduzierbar.

---
Ja, habe die Aktuelle Version unter Deb 9.4 am laufen.
Ich kann ja nichtmal die Standartregeln einfügen lassen wieder -.-

Werde es nochmal versuchen und mich dann melden ;)

Edit:

Hab meine eigene Regeln nun nach passen der Datei per Console eingefügt.
Danach per Keyhelp einfach "laden" lassen. nun sind sie drin.
Last edited by Fiesi on Mon 2. Jul 2018, 14:18, edited 1 time in total.
Ein Systemadministrator schläft nicht. Er root! :)
User avatar
Alexander
Keyweb AG
Posts: 4449
Joined: Wed 20. Jan 2016, 02:23

Re: Fehler bei FIrewall

Post by Alexander »

Füg mal einen leeren Regelsatz ein, und lass diesen einmal anwenden. Danach lädst du deine Regeln wieder ein.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Locked