Stateful firewall

Stateful firewall

In computing, a stateful firewall (any firewall that performs stateful packet inspection (SPI) or stateful inspection) is a firewall that keeps track of the state of network connections (such as TCP streams, UDP communication) traveling across it. The firewall is programmed to distinguish legitimate packets for different types of connections. Only packets matching a known connection state will be allowed by the firewall; others will be rejected.

Early attempts at producing firewalls operated at the application level of the seven-layer OSI model but this required too much CPU speed. Packet filters operate at the network layer (layer-3) and function more efficiently because they only look at the header part of a packet. However, pure packet filters have no concept of state as defined by computer science using the term finite state machine and are subject to spoofing attacks and other exploits.

History

Before the advent of stateful firewalls, a "stateless firewall", a firewall that treats each network frame (or packet) in isolation, was normal. Such a firewall has no way of knowing if any given packet is part of an existing connection, is trying to establish a new connection, or is just a rogue packet. Modern firewalls are connection-aware (or state-aware), affording network administrators finer-grained control of network traffic.

The classic example is the File Transfer Protocol, because by design it opens new connections to arbitrary ports. FTP, among other protocols, needs to be able to open connections to arbitrary high ports to function properly. Since a firewall has no way of knowing that the packet destined to the protected network, to some host's port 4970, is part of a legitimate FTP session, it will drop the packet. Stateful firewalls solve this problem by maintaining a table of open connections and intelligently associating new connection requests with existing legitimate connections.

Description

A stateful firewall is able to hold in memory significant attributes of each connection, from start to finish.These attributes, which are collectively known as the state of the connection, may include such details as the IP addresses and ports involved in the connection and the sequence numbers of the packets traversing the connection. The most CPU intensive checking is performed at the time of setup of the connection. All packets after that (for that session) are processed rapidly because it is simple and fast to determine whether it belongs to an existing, pre-screened session. Once the session has ended, its entry in the state-table is discarded.

The stateful firewall depends on the famous three-way handshake of the TCP protocol. When a client initiates a new connection, it sends a packet with the SYN bit set in the packet header. All packets with the SYN bit set are considered by the firewall as NEW connections. If the service which the client has requested is available on the server, the service will reply to the SYN packet with a packet in which both the SYN and the ACK bit are set. The client will then respond with a packet in which only the ACK bit is set, and the connection will enter the ESTABLISHED state. Such a firewall will pass all outgoing packets through but will only allow incoming packets if they are part of an ESTABLISHED connection, ensuring that hackers cannot start unsolicited connections with the protected machine.

In order to prevent the state table from filling up, sessions will time out if no traffic has passed for a certain period. These stale connections are removed from the state table. Many applications therefore send keepalive messages periodically in order to stop a firewall from dropping the connection during periods of no user-activity, though some firewalls can be instructed to send these messages for applications. It is worth noting that the most common Denial of Service attack on the internet these days is the SYN flood, where a malicious user intentionally sends large amounts of SYN packets to the server in order to overflow its state table, thus blocking the server from accepting other connections.Fact|date=October 2007

Many stateful firewalls are able to track the state of flows in connectionless protocols, like UDP. Such sessions usually get the ESTABLISHED state immediately after the first packet is seen by the firewall. Sessions in connectionless protocols can only end by time-out.

By keeping track of the connection state, stateful firewalls provide added efficiency in terms of packet inspection. This is because for existing connections the firewall need only check the state table, instead of checking the packet against the firewall's rule set, which can be extensive. There is also an additional cost when the firewall's rule set is updated, which should cause the state table to be flushed. Also, the concept of deep packet inspection is unrelated to stateful firewallsClarifyme|date=March 2008 / here the user data in the packet are inspected and as such it is application layer firewall /

Application-level filters

However, packet filtering alone is not regarded as providing enough protection. In order to effectively block peer-to-peer-related network traffic, what is needed is a firewall that does "application filtering", which can be regarded as an extension to stateful packet inspection. Stateful packet inspection can determine what type of protocol is being sent over each port, but application-level filters look at what a protocol is being used for. For example, an application-level filter might be able to tell the difference between HTTP traffic used to access a Web page and HTTP traffic used for file sharing, whereas a firewall that is only performing packet filtering would treat all HTTP traffic equally.

Application-layer firewalls differ from stateful packet-filtering and circuit-level gateways in several ways. Application-layer firewalls support multiple application proxies on a single firewall. The proxies sit between the client and server, passing data between the two endpoints. Suspicious data is dropped and the client and server never communicate directly with each other. Because application-level proxies are application-aware, the proxies can more easily handle complex protocols like H.323, which is used for videoconferencing and VoIP (voice over IP). Application proxies can be transparent to the client and server, as no configuration is required on the client or the server; or can be nontransparent, letting the client and server address the proxy server directly. Transparency versus non transparency is a matter of implementation and address hiding, rather than about security.

Pitfalls

Microsoft's latest operating system, Windows Vista, uses TCP window scaling for non-http (web) connections. So do Linux kernels from versions 2.6.8 on. This behavior is incompatible with some firewalls that use SPI (Stateful Packet Inspection) as found in routers like the Checkpoint NG R55, Cisco PIX IOS earlier than v6.3.1, NetApp Cache Appliances, SonicWall, D-Link DI-724U, Netgear WGR614, and Linksys WRT54GS. [cite web|title=Network connectivity may fail when you try to use Windows Vista behind a firewall device|url=http://support.microsoft.com/kb/934430/en-us] This may be related to previous failures to work properly. Pre-released (beta) versions of Vista allegedly had more problems, including failed http (web) connections through SPI firewalls. [cite web|title=A painful Vista networking bug|url=http://blogs.zdnet.com/Bott/?p=10]

ee also

*Network layer firewall
*Proxy server
*Cisco PIX
*FireWall-1
*Netfilter
*Iptables
*Endian Firewall
*Kerio WinRoute Firewall
*CHX-I

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Stateful Firewall — Unter Stateful Packet Inspection (SPI) versteht man eine dynamische Paketfiltertechnik, bei der jedes Datenpaket einer bestimmten aktiven Session zugeordnet wird. Die Datenpakete werden analysiert und der Verbindungsstatus wird in die… …   Deutsch Wikipedia

  • FireWall-1 — is a firewall product created by Check Point Software Technologies Ltd. The FireWall 1 is a stateful firewall which also filters traffic by inspecting the application layer. It was the first commercially available software firewall to use… …   Wikipedia

  • Firewall (computing) — This article is about the network security device. For other uses, see Firewall. An illustration of where a firewall would be located in a network …   Wikipedia

  • Firewall — A firewall is an integrated collection of security measures designed to prevent unauthorized electronic access to a networked computer system. It is also a device or set of devices configured to permit, deny, encrypt, decrypt, or proxy all… …   Wikipedia

  • FireWall-1 — FireWall 1/VPN 1 ist eine kommerzielle Firewall Software des israelischen Softwareherstellers Check Point. Es handelt sich um eine SPI Firewall, das bedeutet der Datenverkehr wird nicht nur anhand der Informationen auf OSI Ebene 3–4, sondern… …   Deutsch Wikipedia

  • Firewall-1 — FireWall 1/VPN 1 ist eine kommerzielle Firewall Software des israelischen Softwareherstellers Check Point. Es handelt sich um eine SPI Firewall, das bedeutet der Datenverkehr wird nicht nur anhand der Informationen auf OSI Ebene 3–4, sondern… …   Deutsch Wikipedia

  • Firewall-1/vpn-1 — ist eine kommerzielle Firewall Software des israelischen Softwareherstellers Check Point. Es handelt sich um eine SPI Firewall, das bedeutet der Datenverkehr wird nicht nur anhand der Informationen auf OSI Ebene 3–4, sondern explizit auch auf der …   Deutsch Wikipedia

  • Firewall — Eine Firewall (von englisch firewall [ˈfaɪəwɔːl] „die Brandmauer“) ist eine Software, weiter gefasst auch ein System mit einer bestimmten Funktion[1] und ein Teilaspekt[2] eines Sicherheitskonzepts. Die Firewall Software dient dazu, den… …   Deutsch Wikipedia

  • Stateful inspection — Unter Stateful Packet Inspection (SPI) versteht man eine dynamische Paketfiltertechnik, bei der jedes Datenpaket einer bestimmten aktiven Session zugeordnet wird. Die Datenpakete werden analysiert und der Verbindungsstatus wird in die… …   Deutsch Wikipedia

  • Stateful Packet Inspection — Unter Stateful Packet Inspection (SPI), deutsche Bezeichnung Zustandsorientierte Paketüberprüfung , versteht man eine dynamische Paketfiltertechnik, bei der jedes Datenpaket einer bestimmten aktiven Session zugeordnet wird. Die Datenpakete werden …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”