firewall

Firewall From Hackepedia

A Firewall is part of an Operating System's networking stack that allows one to create policies for network traffic, and permit or deny that traffic accordingly. Firewalls most commonly work on OSI layers 3 and 4, although any layer except 1 is possible. Commercial firewalls often inspect higher layers than 3 and 4, for example SMTP content (RFC 2821 and 2822). Firewalls cannot inspect encrypted protocols (see cryptography) unless they have been given the secret key. Firewalls can run either on a specific host, or on a dedicated system that sits between the production systems and the rest of the Internet.

Our recommended process for installing a firewall is to have a "default deny" stance. This means "block all in" and block all out" by default. Once that has been established, then only allow rules as required.

For example, if you have blocked all by default, first you will want to try to resolve DNS I'm sure. So you will need to start a packet sniffer (tcpdump, ethereal, snoop) and watch the packets trying to leave and come in. In another window, type "host hackepedia.org" to try and resolve this DNS. As you should see, you need to allow port 53.. but was that TCP or UDP? You not only want to only allow that port, you may as well include the protocol as well. Once you have modified your firewall ruleset so that "host hackepedia.org" actually resolves and returns an IP address, try to use your browser to get there. As you will see, now you need to create a TCP rule for outbound port 80. Repeat this process as needed for each service, and eventually you'll have a very decent firewall.

Of course, this is time consuming, and error prone, especially for someone who is just starting. A better solution may be to find a ruleset, or script online, and modify it until it works and fits your specific requirements.

A common mistake we see it an implicit allow all outbound, this is a mistake, and very beneficial to anyone who has just compromised your machine. Allow only the required ports and protocols outbound, most commonly ports 80 (web) and 25 (smtp), and block and log everything else outbound. If you find something isn't working, check the logs and allow a rule for that application, if you approve of its usage. It will be a short bell curve until you will very rarely have to modify your outbound ruleset, as outbound traffic rarely changes.

Firewalls for UNIX

Firewalls for Windows

Windows#Firewalls


German - von Hackepedia

Eine Firewall ist ein Teil des Betriebsystems Netzwerkstapel das Richtlinien für Netzwerk Verkehr gibt, entweder ein Erlauben oder Verbieten für jedes Paket. Firewalls sind meistens auf der OSI Schicht 3 und 4 aber eigentlich ist alles ausser OSI Schicht 1 möglich. Kommerzielle Firewalls oft inspizieren OSI Schichten über 3 und 4, zum beispiel SMTP (RFC 2821 und 2822). Firewalls können nicht Verschlüsselte Protokolle (Siehe cryptography) inspizieren ausser wenn sie von den geheimen Schlüssel wissen. Firewalls können auf dem speziefischem Computer laufen oder auf einem dediziertem System das zwischen Produktion und Internet sitzt.

Unser vorgeschlagener Prozess, eine Firewall zu installieren ist das man eine "default deny" (also standardmässig verkehr verbieten). Das heist das alles geblockt wird das reingeht (block all in) und alles das rausgeht (block all out). Sobald das gemacht ist können Richtlinien die Verkehr erlauben angebracht werden.

Zum Beispiel. Wenn alles standardmässig geblockt wird, zuerst wird man sicherlich versuchen DNS aufzulösen. So wird man mit einem Packet Sniffer ausgerüstet (tcpdump, ethereal, snoop) die Pakete sehen die versuchen rein und rauszukommen. In einem anderen Fenster typpt man das Kommando "host hackepedia.org" und versucht dieses aufzulösen im DNS. Jetzt wird man sehen das Port 53 durchgeschaltet werden soll, aber ist das TCP oder UDP? Mann würde nicht nur diese port durchschalten, sonder auch das gesamte Protokol (siehe /etc/protocols). Sobald die Firewall modifiziert ist, so das "host hackepedia" auflöst und eine IP Adresse zurück gibt, dann würde man einen Web-browser nehmen und versuchen dorthin zu kommen. Wie man dann sehen würde müsste man eine TCP regel für port 80 durchschalten (ausgehend). Und so weiter. Dieses wird wiederholt für jeden Dienst und eventuel hat man eine gute Firewall. Alle Dienste die nicht angepasst sind werden geblockt.

Natürlich ist diese alles sehr Zeit-aufwendig und Fehlerhaft, besonders für Jemanden die Anfänger sind. Eine bessere lösung währe eine liste der Firewall-regeln online zu finden und sie zu modifizieren bis es funktioniert und mit ihnen einverstanden ist.

Ein häufiger Fehler ist alles durchzulassen. Das ist ein Fehler und ist sehr helfreich für jemanden die diesen Rechner gerade ge-hackt haben. Versuche nur die nötigen Ports und Protokolle durchzulassen, meistens port 80 und 25, und blockiere und schreibe auf (log) alles andere. Wenn irgendetwas nicht funktioniert siehe dem syslog oder dmesg für die blockaden-nachrichten und schreib eine Richtlinie für diese Applikation nachdem es überprüft ist. Es ist nicht oft das man ausgehenden verkehr Richtlinien ändert da der ausgehende Verkehr sich sehr wenig ändert.

UNIX Firewalle

Firewallen für Windows

Wir haben noch nichts zum schreiben hier.