|
| 1 | +--- |
| 2 | +title: How does a firewall work? |
| 3 | +date: 2018-08-09 |
| 4 | +categories: |
| 5 | +- Network |
| 6 | +- Security |
| 7 | +- Tutorials |
| 8 | +tags: |
| 9 | +- firewall |
| 10 | +- network |
| 11 | +- security |
| 12 | +- tutorials |
| 13 | +draft: false |
| 14 | +description: How does a firewall work and what types of firewalls are there? |
| 15 | +preview: ../../../assets/images/posts/it-security/UTM-Firewall-Hardware.png |
| 16 | +hero: /images/posts/it-security/UTM-Firewall-Hardware.png |
| 17 | +menu: |
| 18 | + sidebar: |
| 19 | + name: How do firewalls work and what different types are there? |
| 20 | + identifier: function-firewall |
| 21 | + parent: security |
| 22 | +--- |
| 23 | +## What is a firewall and how does it work? |
| 24 | +In this article, I would like to answer the question “**How does a firewall work**” with the help of the OSI layer model, among other things. In order to ensure security in a network, it is of course extremely important to understand how a firewall works. In this article, I will therefore attempt to explain the individual functions of a firewall in a way that is easy to understand. This will enable you to control data traffic optimally according to your requirements. |
| 25 | +If we want to explain how a firewall works, we should first take a closer look at the OSI layer model. |
| 26 | +### How does a firewall work – OSI layer model |
| 27 | + |
| 28 | +OSI layer model – How does a firewall work? |
| 29 | +[The OSI model](https://de.wikipedia.org/wiki/OSI-Modell) is divided into seven layers, of which only layers 3, 4, and 7 are relevant to firewalls. |
| 30 | +### OSI model layer 3 – network layer |
| 31 | +The network layer is responsible for switching connections (performance-oriented services) and, in the case of packet-oriented services, for forwarding data packets. It is important that packets do not enter other layers, but are forwarded from node to node. If the “sender” and “receiver” cannot be reached directly, the packets are always assigned a new intermediate destination (node) until the actual destination is reached. |
| 32 | +The task of the network layer is to assign addresses to the packets, negotiate and ensure a certain quality of service, update the routing tables, and establish the routing itself. |
| 33 | +#### Hardware used in this layer: |
| 34 | +- Router |
| 35 | +- Layer 3 switch |
| 36 | +#### Protocols used in this layer: |
| 37 | +- IP, IPsec, ICMP, X25 (WAN), CLNP |
| 38 | +### OSI model Layer 4 - Transport layer |
| 39 | +The transport layer is responsible for segmenting the data stream and preventing congestion. |
| 40 | +The segments are called service data units and are transported at the fourth layer. For addressing purposes, the data segment is assigned a fourth layer address, which is then the port. This data segment is then encapsulated in a data packet and enters the third layer (network layer). |
| 41 | +#### Protocols: |
| 42 | +- TCP, UDP, SCTP, DCCP |
| 43 | +### OSI model layer 7 – Application layer |
| 44 | +The application layer provides functions for applications (their communication). This is where connections to the lower layers are established and where data is entered and outputted. |
| 45 | +#### Applications (apps): |
| 46 | +- Email programs, messaging (e.g., Facebook, Twitter, etc.), browsers |
| 47 | +## What is a firewall? |
| 48 | +A firewall is a security system that uses rules to protect a network area from unauthorized access. The firewall itself is not able to detect attacks on the network independently, as it only works on a rule-based system. |
| 49 | + |
| 50 | +## Basic functions of a firewall |
| 51 | +The basic function of a firewall is to use packet filters. These packet filters work according to static rules and check each data packet individually, but cannot establish connections to previous packets. |
| 52 | +An advanced form of packet filtering is known as stateful inspection. This type of packet filtering recognizes and checks individual relationships between the monitored data packets. |
| 53 | + |
| 54 | +## How packet filtering works |
| 55 | +In packet filtering, data packets are identified by a network address and either forwarded to their destinations or blocked. To implement these guidelines, the header information of the individual data packets is evaluated and handled according to these rules. Packet filtering thus operates in the transport layer (layer 4, port), network layer (layer 3, IP address) and, in some stateful firewalls, also in the application layer (layer 7, here the user data) of the OSI model. |
| 56 | + |
| 57 | +## How stateful inspection packet filtering works |
| 58 | +Stateful inspection is a dynamic type of packet filtering. Here, each connection request is specified in more detail. Relationships to requested data packets and transmitted data packets are examined, allowing the permitted data packets to be assigned more accurately. This ensures that only the communication partners involved can access the connection. |
| 59 | +## How does a firewall work – types of firewalls |
| 60 | +### Personal firewall |
| 61 | +A personal firewall, also known as a desktop firewall, is security software that monitors the communication of a single computer. Personal firewalls are available individually or as part of many antivirus security solutions from well-known manufacturers. Whether this type of security solution is recommended from the point of view of your computer's security is open to question. I wrote an article on this topic some time ago. In the |
| 62 | +### External firewall |
| 63 | +An external firewall, also known as a hardware firewall, monitors communication, depending on the hardware configuration, either on an internal network (LAN, e.g. company network) or between several subnets and other network segments (WAN, e.g. the Internet) to prevent unauthorized access. |
| 64 | +For the sake of clarity, the term **hardware firewall** is a little misleading here. This is because a firewall is always based on software. Hardware firewall only describes the fact that this security software is housed on separate hardware. |
| 65 | + |
0 commit comments