Introduction
Firewalls are among the oldest tools in IT security and still among the most important. A firewall keeps unwanted connections out of a network, and it can also stop data from leaving it and close internal gaps. Knowing what a firewall does and which types exist shows how it helps against attacks such as DDoS or unauthorized access.
What is a firewall? Basics and definition
A firewall is a security barrier that controls traffic between networks. It decides based on predefined rules whether data packets are allowed or blocked. These rules are based on parameters such as IP addresses, ports, and protocols. The term “firewall” originally comes from the construction industry, where a fireproof wall is used to prevent the spread of fires. The picture fits: a firewall in IT stops a problem in one network from spreading into another.
The first firewalls were developed in the 1980s, when companies began connecting their networks to each other. These early systems were simple packet filters that worked at the network level. Modern firewalls work at several layers of the ISO/OSI model, which lets them detect more sophisticated attacks as well.
Key functions of a firewall include:
- Blocking unauthorized access to networks.
- Protection against malware by filtering malicious data packets.
- Logging and analyzing network activities.
- Monitoring applications and user activities.
Types of firewalls: hardware, software, and cloud solutions
Hardware firewalls
Hardware firewalls are standalone devices positioned between an internal network and the internet. They offer high performance and are particularly suitable for companies with large networks. Well-known manufacturers like Cisco and Fortinet provide specialized devices that can analyze traffic in real time. Their advantages lie in their reliability and independence from operating systems.
Software firewalls
In contrast, software firewalls run on individual devices or servers. Examples include the Windows Defender Firewall and the firewalls built into Linux and macOS. They offer flexibility and are often more cost-effective than hardware firewalls. They are ideal for small businesses and individual users, as they are easy to configure and adapt to specific requirements. Open-source solutions such as pfSense sit in between: they turn an ordinary computer into a dedicated firewall for a whole network.
Advantages of software firewalls:
- Lower cost compared to hardware solutions.
- Customizability through user-defined rules.
- Easy integration into existing systems.
Cloud-based firewalls
As more IT infrastructure moves to the cloud, cloud-based firewalls are becoming more common. They protect hybrid environments and scale without any physical devices. Because they can handle large amounts of traffic, they work well against DDoS attacks.
Inbound and outbound rules: controlling traffic
Controlling traffic is the firewall’s main job. To do this, it uses rules for inbound and outbound connections:
- Inbound rules: determine which external connections are allowed to access an internal network. This prevents unauthorized access and protects against threats such as malware infections.
- Outbound rules: regulate which data is allowed to leave the network. This is particularly important for preventing the leakage of sensitive information.
An example of such rules in practice is protecting servers that store sensitive data. Administrators can allow access only to specific IP addresses while preventing internal users from accessing insecure websites.
Typical firewall rules include:
- Allowing HTTPS connections (Port 443) for secure internet access.
- Blocking all unknown or unauthorized IP addresses.
- Restricting connections based on time of day or user groups.
Firewalls and ISO/OSI layers: multidimensional security
Firewalls operate at several layers of the ISO/OSI reference model. At the network layer (Layer 3), they filter data packets based on IP addresses. At the transport layer (Layer 4), they analyze ports and protocols, while at the application layer (Layer 7), they monitor specific applications and content.
An example of Layer-7 security is “Deep Packet Inspection” (DPI). With this technology, firewalls can analyze data packets down to the application level, making them particularly effective against complex attacks such as SQL injections or phishing.
Working on several layers means a firewall can catch attacks at different levels. While a basic packet filter firewall only checks the origin of a data packet, a modern Layer-7 firewall can also analyze the type of content and applications and block malicious actions.
Protection against DDoS attacks: the firewall as a line of defense
DDoS attacks (Distributed Denial of Service) aim to overwhelm networks with massive traffic. A modern firewall can absorb part of such an attack. It detects unusual traffic and blocks suspicious IP addresses in real time. Mechanisms like rate limiting and connection timeouts can mitigate attacks before they cause damage. Bots that send ordinary-looking requests from many IP addresses are harder to catch this way, which is where bot detection on the website itself comes in.
In practice, it can look like this: within seconds, thousands of connections arrive from addresses that have never visited before. The firewall spots the pattern, throttles those sources and keeps serving regular users.
Firewall strategies for DDoS defense:
- Using IP blacklists for known attackers.
- Limiting concurrent connections per user.
- Prioritizing legitimate data packets within the network.
Conclusion: why firewalls are important
A firewall decides which connections may enter or leave a network, and most other security measures build on that decision. It works alongside antivirus programs and VPNs rather than replacing them. With attacks getting more complex, running a network without a well-configured firewall is hard to justify.
Still, even the best firewall is not a security strategy on its own. Regular updates, trained staff and additional systems such as intrusion detection systems (IDS) keep a network secure over time.