What is a firewall?A firewall is software or hardware used to monitor network data (traffic) and compare it against a set of rules. Depending on the rules, traffic will be passed or blocked. On the Internet, you might hear this analogy: a firewall is a guard or gatekeeper at the entrance of an event. This gatekeeper can check the ID of individuals against a set of rules before letting them enter (or leave). But before I explain more, I need to cover some basics – OSI layers and TCP/IP.
Layers of the OSI model and TCP/IPThe OSI Model (Open Systems Interconnection Model) is used to describe how a network system functions. This model is split into seven abstraction layers:
- Physical – lowest level responsible for a physical connection between devices, transmitting bits from one node to the next. This layer converts data to 0s and 1s to the next Data Link layer.
- Data Link – this layer is responsible for checking if data transfer is error-free (error checking/formatting) between one node to another in the physical layer. The primary purpose of the data link layer is to help the sender send a set of meaningful bits to the receiver.
- Network – this layer is responsible for defining which physical path the data will take. It is taking care of the transmission of data from one host to another that are on different networks.
- Transport – transmits data using transmission protocols (TCP and UDP). It contains information if the data transmission is successful, and then, if yes, it transmits the data. If an error is found, the data is re-transmitted.
- Session – this layer maintains connections and is responsible for controlling ports and sessions.
- Presentation – this layer ensures that data is in a usable format. It is also where encryption occurs.
- Application – this layer interacts with the user and displays the received information to them.
Classifications of firewallsThere are a few classifications for firewalls. The first one is a hardware or software firewall. Hardware is when the firewall is separate hardware through which the network traffic is going (such as Cisco ASA). A software firewall is software that comes with the OS, such as Windows Defender Firewall – which is also called a host firewall. On Linux, you usually get a built-in host firewall called ufw (uncomplicated firewall). You can also install a third-party solution (Comodo, Norton, etc.) The second one is the classification by personal or commercial use. Personal is mainly for use at home and it is designed for small networks. The commercial firewall is designed to protect medium to large networks. However, the most important classification is by the layers on which the firewall operates. Firewalls mainly focus on layers 3 and 4 (sometimes even 2). Next-generation firewalls cover layers 5, 6, and 7. The third classification is based on firewall abilities:
- Packet-Filtering FirewallCircuit-Level Gateway
- Stateful Inspection Firewall
- Proxy Firewall – all traffic goes through WAF on its way to the server
- Next-Generation Firewall (NGFW)
- Cloud Firewall or Firewall as a Service (FWaaS)
Web Application FirewallDefinition of WAF by OWASP on their site: A “‘ web application firewall (WAF)'” is an application firewall for HTTP applications. It applies a set of rules to an HTTP conversation. Generally, these rules cover common attacks such as Cross-site Scripting (XSS) and SQL Injection. While proxies generally protect clients, WAFs protect servers. A WAF is deployed to protect a specific web application or set of web applications. The proxy firewall inspects the content of the payload (packets). As a difference between the third classification from the paragraph above, this one is not limited to packet headers. FWaaS is a hardware firewall in a cloud environment. Its features depend on the service provider, and it benefits from the scalability of cloud architecture.
Types of Web application firewallsThere are three types of web application firewall: hardware, software, and cloud-based. All of them have advantages and disadvantages, and it is very important to know them before choosing the right one for your web application. 1- Hardware – This hardware solution is installed locally in LAN close to application and web servers. This solution is good because it can be modified, and it supports configurations and updates. It is very fast, and it has high performance. This type is perfect for big organizations when the application has many visits on daily basis. For small organizations, it is not cost-efficient because it can be costly. List of WAFs: WAPPLES, Imperva SecureSphere, Barracuda Web Application Firewall, Citrix Netscaler Application Firewall, Fortinet FortiWeb, F5 BIG-IP Application Security Manager (ASM). 2- Software – this one is different than a hardware firewall because you would need a virtual machine instead of dedicated hardware. Of course, as you can guess that this solution is usually cheaper than hardware. The advantage is that it can be used in your on-prem systems, while you can also deploy it in the cloud. A disadvantage is that it is slower because it runs on a VM. This solution is suitable for small and medium organizations. 3- Cloud – this firewall is provided and managed in the form of software as a service – SaaS. This solution is entirely in the cloud. This solution is good because the service provider provides optimizations and updates, so you would not need to manage anything. On the other hand, it is also a disadvantage because if you require some customizations, you can simply not do it, or if there exists such an option, it will probably be more complex in some way. This solution is good for small and medium organizations which don’t have enough resources that would focus on the management of WAF. *List of software and cloud-based WAFs will be covered in the next part of the article.
How is WAF configured?WAF can be configured in three different ways:
About Version 2
Version 2 is one of the most dynamic IT companies in Asia. The company develops and distributes IT products for Internet and IP-based networks, including communication systems, Internet software, security, network, and media products. Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.
TOPIA is a consolidated vulnerability management platform that protects assets in real time. Its rich, integrated features efficiently pinpoint and remediate the largest risks to your cyber infrastructure. Resolve the most pressing threats with efficient automation features and precise contextual analysis.