Security Mechanisms: Firewalls, IDS, and IPS

Security Mechanisms: Firewalls, IDS, and IPS

TL;DR

Network security systems like firewalls, IDS (Intrusion Detection Systems), and IPS (Intrusion Prevention Systems) work together to protect your network. Firewalls filter incoming and outgoing traffic based on security rules. IDS monitors network activity to detect suspicious behavior and alerts administrators, while IPS goes a step further by actively blocking malicious traffic on top of detecting it. Firewalls are great at blocking unauthorized access, IDS helps identify potential threats, and IPS can stop attacks before they cause harm. Together, they provide multi-layered defense for your network.

This site, bashbreach.com, actually uses some other security measures such as:

With these measures in place, bashbreach.com stays secure. I hope...



Firewalls

A firewall is a network security device that separates your internal network from an external network that might be deemed untrustworthy. Think of firewalls as a physical security gate in your house that decides what comes in and what doesn’t. It monitors incoming and outgoing traffic, based on protocols. Simply, firewalls examine and control traffic by allowing or denying it appropriately with pre-established security rules.

Think of firewalls as the TSA. They work as a checkpoint between you and the internet, they analyze data packets being sent over the network, and then according to the rules they determine what's allowed and what isn’t, for your safety.
Firewalls do things like block unauthorized access while allowing legitimate traffic, filter data packets based on security rules, prevent malware and hackers from exploiting vulnerabilities, and can be configured to allow or deny specific applications, services, or IP addresses.1

firewall-diagram

There are also different types of firewalls such as:

Intrusion Detection System (IDS)

An Intrusion Detection System (IDS) monitors network activity to identify potential threats and vulnerabilities. It analyzes traffic without interfering, alerting administrators to suspicious behavior.

Intrusion detection involves monitoring and analyzing events in a computer system or network to identify attempts to compromise its confidentiality, integrity, or availability, or bypass security measures. These intrusions can come from external attackers, authorized users trying to gain unauthorized privileges, or those who misuse their granted access. Intrusion Detection Systems (IDSs) are tools—either software or hardware—that automate the monitoring and analysis process to detect such suspicious activities.6

Having an IDS and a firewall on a network can add extra network security because of how they complement each other. While a firewall acts as the first line of defense by blocking unauthorized traffic, an IDS works alongside it by analyzing that traffic that passes through, identifying suspicious activity.

  1. The firewall follows the network's security rules, allowing or blocking data passing through based on IP addresses, ports, and protocols. But firewalls do have they're limits. They're unable to inspect the incoming traffic deeply for anything suspicious/malicious. Meaning malware can possibly enter.

  2. Now its the IDS's job to analyze the traffic that passes through the firewall. It examines patterns to recognize malware, brute force attacks, or unusual data transfers. Once malicious behavior is detected, it can take the necessary precautions to document it and alert administrators.

ids-diagram

You can see how a firewall alone may not detect attacks that exploit legitimate traffic. But when paired with an IDS, it identifies those hidden threats. Now it doesn't really have to go in that order. It could be the IDS goes first and inspects the traffic, and then it goes through the firewall. But I feel it makes much more sense for it to go after the firewall.

Many Intrusion Detection Systems (IDSs) are built around three core components: Information sources, analysis, and response. Information sources are the various sources of event data used to determine if an intrusion has occurred. Common sources include network, host, and application monitoring. Analysis is the process organizes the data from information sources to identify potential intrusions. The two primary analysis methods are misuse detection, which looks for known attack patterns, and anomaly detection, which flags unusual behavior. And finally response is where once an intrusion is detected, the system takes action. Active measures involve automated responses (such as blocking traffic), while passive measures involve generating reports for human review, who then decide on further actions. These responses are all seperate and not a built-in function with intrusion detection systems.



Intrusion Prevention System (IPS)

An Intrusion Prevention System (IPS) is like a proactive security guard for your network. It actively scans traffic for malicious activity, stopping threats before they can cause harm. This helps reduce the workload for security teams by attacks before they even reach the network defenses. And unlike an Intrusion Detection System (IDS), which just watches and alerts, an IPS sits directly in the traffic path to take action in real-time. Usually placed just after the firewall, it examines incoming traffic and can block harmful data, issue alerts, block suspicious sources, or even reset connections to prevent further attacks.

IDS vs IPS? I'd honestly think that IPS is a much better option. It combines the knowledge of IDS in an automated manner. Not only will it detect malicious patterns, but take the necessary actions to prevent them. It can even alert secruity teams. An IDS is only for detecting and monitering intrusions. It won't take any action on its own. Not only that but an IDS needs help from a human, or a seperate automated system to interpret the results. An IPS can decide whether to accept or reject packets (based on rules). Although both analyze traffic and compare it to known threats, I believe that IPS is a much better option for network security.7

ips-diagram

To keep things running smoothly, IPS systems use techniques like signature-based detection, anomaly-based detection, and stateful protocol analysis. Modern IPS tools are often part of next-generation firewalls (NGFWs) and cloud security services, adding an extra layer of protection to keep your network safe.

Signature-based detection - Signature-based detection works by comparing observed events to pre-defined patterns, or "signatures," of known threats. It’s fast, easy to set up, and excels at identifying known attacks. However, it struggles with new or modified threats, especially those using evasion techniques, making it less effective against unknown or variant attacks. Despite these limitations, a signature-based IDS can still be highly accurate when it comes to detecting recognized threats.

Anomaly-based detection - Anomaly-based detection involves comparing observed activity against predefined profiles of "normal" behavior, such as typical user actions, network connections, or application usage. These profiles are created by monitoring standard activity over time. The main advantage of this technique is its ability to identify unknown or unusual threats. For example, an anomaly-based IDS might flag a malformed IP packet as suspicious, not because it matches a known attack pattern, but because it deviates from expected behavior. This makes anomaly-based detection effective at spotting new or unexpected types of malicious activity.

Stateful protocol analysis - Stateful protocol analysis involves comparing observed network traffic against predefined profiles of normal behavior for each protocol state. It looks for deviations from accepted patterns to identify potential threats. While it shares similarities with anomaly-based detection, stateful protocol inspection goes further by analyzing traffic at the network and transport layers, as well as vendor-specific traffic at the application layer—areas that anomaly-based detection typically cannot examine. This makes stateful analysis a more comprehensive approach to detecting unusual traffic.



Overview

Next time when discussing network security, tools like firewalls, IDS, or IPS should come in mind. These mechanisms form the backbone of strong network architectures, each serving a unique purpose in protecting data, systems, and users from threats that continuously evolve. Whether it's blocking unauthorized access, identifying suspicious activity, or preventing harmful traffic, they work together to build a layered and secure defense.



References

  1. What Does a Firewall Do?
  2. Packet Filtering Firewall
  3. What Is a Stateful Packet Inspection Firewall?
  4. A Survery on the Different Technologies
  5. Network Security and Next-Generation Firewalls
  6. Intrusion Detection Systems
  7. Intrusion Detection System and Intrusion Prevention System: A Comparative Study