USD ($)
$
United States Dollar
India Rupee

What is Firewall in Computer Network

Created by Gautam Kumar in Articles 3 Dec 2024
Share
«What is a Cybersecurity Consultant and ...

What is Firewall in Computer Network: An Overview

In layman's term it is not easy to answer what is firewall but I'll try based on current situation. A firewall is an object deployed between two separate spaces to prevent the spread of any kind of virus from one space to another. 

In computer network, a firewall can be a software installed on a computer or a hardware device that filters or restricts unwanted data traffic from one computer or network to another.

Firewall in computer network is a crucial part of IT infrastructure for securing computer networks and other elements. We can categorize a firewall in to host based or network based.


Host Based Firewall

A host based firewalls are installed on end user's computer systems which take action to either allow or deny the traffic. In this case, the firewall services run on the local computer, it consumes resources and impact the other applications of that system only.

In host based firewall architecture, traffic passes through all the network components, that means consuming the network resources before reaching to the end user computer. Here in the below picture is an example of a host based firewall on Microsoft Windows 10.

Image description


Network Based Firewall

A network based firewall is completely transparent to the end user. Such types of firewalls are deployed in the network perimeter or at the internet edge to prevent unwanted traffic from entering into the network. 

The end users are completely unaware about the network firewall that is controlling the traffic. In this case, no software is installed in the end user's computer system.

Stateless Firewall

The previous generation of firewall in computer network was able to allow or block traffic based on these 5 elements of a packet called tuple.

● Source IP Address

● Destination IP Address

● Source Port

● Destination Port

● Protocol

When these firewalls examine the packets they are not aware about whether the packet is a part of the existing connection or not. That means these firewalls are not able to identify if the packet is manipulated or a rogue packet. That's why these types of firewalls called Stateless firewalls.

The stateless firewall utilizes the 5-tuple of the OSI layer model as given below.

 Image description

Now let's take an example to understand what is firewall in computer network particularly stateless one. When an access control list (ACL) is configured in which there is a requirement of allowing only HTTP and DNS traffic while blocking all other inbound traffic on network edge Cisco router.

Image description

In this case it is not checking any state of the incoming packet but only check the protocol number HTTP is 80 and UDP is 53 which are TCP and UDP based protocols respectively.

Note: Here Router represents "Internet Edge Cisco Router" shown in the above diagram and no IP address is used in the ACI for allowing or denying traffic.

Router(config)# access-list 100 permit tcp any any eq 80

Router(config)# access-list 100 permit udp any any eq 53

Router(config)# access-list 100 deny ip any any

Router(config)# interface GigabitEthernet0/0

Router(config-if)# ip access-group 100 in

Similarly, stateless firewall in computer network can be implemented on linux as iptables, let's take an example in which we need to block inbound traffic to SSH (port 22) except from a specific IP address 192.168.1.10

# Allow inbound SSH traffic from a trusted IP

sudo iptables -A INPUT -p tcp --dport 22 -s 192.168.1.10 -j ACCEPT

# Block all other inbound SSH traffic

sudo iptables -A INPUT -p tcp --dport 22 -j DROP

# Save the iptables rules

sudo iptables-save > /etc/iptables/rules.v4


Stateful Firewall

Stateful firewalls are developed to overcome the limitations of stateless firewalls. It keeps the state of the connection in the memory that allows firewall to track the connection stage of TCP handshake, based on which firewall can take action to reject or allow the packets.

In TCP, each connection has a lifetime .Each TCP connection goes through a series of states which are used by the firewall to filter traffic. Here is the TCP connection state diagram.

 Image description

Traditional firewall in computer network, whether stateless or stateful, often fall short in protecting against modern cyber threats targeting today's applications. To effectively safeguard your network, you need more than basic traffic filtering at layers 2–4.

A robust solution must offer advanced capabilities like application visibility and control, deep packet inspection across layers 3–7, intrusion prevention, encrypted traffic decryption, protocol anomaly detection, and contextual data-driven security event correlation.

Most of the firewall vendors offer stateful firewall, let's take some of the most prominent firewalls and look how to configure stateful firewall on them.

1. Stateful Firewall with IPTABLES in Linux -  Allow established and related connections while blocking new incoming connections except on port 80 (HTTP).

# Allow all traffic on the loopback interface

sudo iptables -A INPUT -i lo -j ACCEPT

# Allow established and related connections

sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

# Allow new incoming HTTP connections

sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT

# Drop all other incoming traffic

sudo iptables -A INPUT -j DROP

# Save the iptables rules

sudo iptables-save > /etc/iptables/rules.v4

2. Stateful Firewall Configuration on Cisco ASA - Permit outbound HTTP/HTTPS traffic and allow return traffic (stateful inspection).

ASA(config)# access-list OUTBOUND extended permit tcp any any eq 80

ASA(config)# access-list OUTBOUND extended permit tcp any any eq 443

ASA(config)# access-group OUTBOUND in interface inside

# Enable stateful inspection for TCP and UDP

ASA(config)# policy-map global_policy

ASA(config-pmap)# class inspection_default

ASA(config-pmap-c)# inspect tcp

ASA(config-pmap-c)# inspect udp

ASA(config-pmap-c)# exit

ASA(config)# service-policy global_policy global

3. Stateful Firewall on Palo Alto Firewall - Palo Alto firewalls are stateful by default; no additional setup is required for connection tracking. Allow web traffic (HTTP/HTTPS) while inspecting stateful sessions.

Log in to the Palo Alto web interface.

Navigate to Policies > Security and create a new rule:

Source Zone: Trust

Destination Zone: Untrust

Applications: web-browsing, ssl

Action: Allow

Save and commit the changes.

Verification:

Monitor the traffic logs under Monitor > Traffic.

Verify session states under Monitor > Sessions.

4. Stateful Firewall on FortiGate - Allow inbound SSH and HTTP connections with stateful tracking.

Log in to the FortiGate web interface.

Navigate to Policy & Objects > IPv4 Policy.

Create a new policy:

Incoming Interface: WAN

Outgoing Interface: LAN

Source: All

Destination: All

Service: SSH, HTTP

Action: Allow

Save and apply.

Verification:

View sessions in the Dashboard > Sessions.

Test connections using tools like ssh or curl.


Next Generation Firewall

The next-generation firewall (NGFW) addresses these challenges by consolidating all these critical security features into a single, efficient platform, ensuring comprehensive protection against evolving cyber threats.

Traditional firewall in computer network including stateful, often fall short in protecting against modern cyber threats targeting today's applications. To effectively safeguard your network, you need more than basic traffic filtering at layers 2–4.

It offers robust solution with advanced capabilities like application visibility and control, deep packet inspection across layers 3–7, intrusion prevention, encrypted traffic decryption, protocol anomaly detection, and contextual data-driven security event correlation.

The next-generation firewall (NGFW) addresses these challenges by consolidating all these critical security features into a single, efficient platform, ensuring comprehensive protection against evolving cyber threats.

Here is the diagram depicted some of the security services as next generation firewall (NGFW) 

Image description


Here are some of the top vendors, visit their website to understand more on what is firewall in computer network. Each have their set of firewall and other various security products to secure the IT infrastructure. 

Leading Firewall Vendors

Cisco: 

● Offers a range of firewalls, including NGFWs, through its Cisco ASA and Firepower series.

● Known for high security, integration with Cisco network environments, and scalability.

Palo Alto Networks:

● Provides advanced NGFWs with application, user, and content identification capabilities.

● Strong focus on threat prevention and integration with other Palo Alto products, like their Cortex XDR.

Fortinet:

● Known for its FortiGate series, which integrates firewall, VPN, antivirus, and intrusion prevention.

● Offers a range of appliances for small to enterprise-level organizations.

Juniper Networks:

● Provides firewalls through its SRX series, focused on performance and advanced threat intelligence.

● Often used in enterprise data centers and cloud environments.

Check Point:

● Known for robust NGFW features, Check Point firewalls are widely used in corporate networks.

● Offers unified threat management, secure application control, and centralized management.

Sophos:

● Provides firewall solutions integrated with endpoint protection.

● Known for user-friendliness, strong threat detection, and its XG Firewall series tailored for small to medium-sized businesses.



Best Firewall Certification Courses & ...»
Gautam Kumar

Gautam Kumar is a senior network engineer having more than 7 years of experience in different companies in India. His work experience in network support and operation and maintaining of any network makes him one of the most valuable IT professional in industry. He has been involving in planning, supporting the physical and wireless networks, ...

More... | Author`s Bog | Book a Meeting

Related Articles

#Explore latest news and articles

Top 6 Networking Certifications for Network Engineers 28 Oct 2024

Top 6 Networking Certifications for Network Engineers

Dive into the best networking certifications, including top choices like Cisco. Discover the most valuable certifications for network engineers today.
How Does TCP Work: TCP IP Protocol Suite 8 Nov 2024

How Does TCP Work: TCP IP Protocol Suite

In-depth details of how does TCP work including a packet level understanding on how TCP three-way handshake works.
Mac Address Flooding: Learning & Aging 12 Nov 2024

Mac Address Flooding: Learning & Aging

Learn MAC address flooding and aging process in switches. Understand how switching concepts impact network security & performance. Read More!
Palo Alto Firewall Features: An Overview 29 Jul 2024

Palo Alto Firewall Features: An Overview

Introduction to Palo Alto Firewall Features and explore the key aspects and capabilities of Palo Alto Firewall.

Comments (1)

Dcancerian Student
9 Apr 2023 | 01:33 am

Nice Article! This should help new aspirants of CCNA certification.

Share

Share this post with others

Contact learning advisor

Captcha image
Join Cisco ACI Live Training – Starting 7th December! Enroll Now to Master ACI.
Join Cisco ACI Live Training – Starting 7th December! Enroll Now to Master ACI.
Expert-Led Cisco ACI Training with Lab Access.
Day
Hr
Min
Sec
Register Now