What are firewalls?
Network access control system that verifies all the packets flowing through it
What are the main functions of firewall?
IP packet filtering
Network address translation (NAT)
What is the relationship between security policies and firewall rules?
A firewall is a stupid bouncer at the door, it just applied rules, therefore, bad rules means no protection
How are firewalls classified?
They are classified based on their packets inspection capability
What are the different firewall types?
Network layer firewalls, and application layer firewalls
What is packet filtering ?
Packet filters are a type of firewall technology used to control network access by monitoring outgoing and incoming packets and allowing them to pass or halt based on predetermined security rules. These rules are typically based on the packet’s source and destination IP addresses, ports, and the protocol being used. Packet filtering can be implemented on routers, switches, or dedicated firewall devices.
What are the packet filtering rules and what are their components
Rules for packet filtering are typically written using Access Control Lists (ACLs). These lists contain a series of statements or rules that define the criteria for allowing or blocking network traffic.
Components of a Packet Filtering Rule
1. Source IP Address: Specifies the IP address of the origin of the packet. This can be a single IP address, a range of addresses, or a subnet. 2. Destination IP Address: Specifies the IP address of the destination of the packet. Similar to the source IP, it can be a single address, range, or subnet. 3. Source Port: Specifies the port number from which the packet is sent. This is relevant for TCP and UDP protocols. 4. Destination Port: Specifies the port number to which the packet is destined. This helps in filtering traffic based on services (e.g., HTTP, FTP). 5. Protocol: Specifies the protocol type, such as TCP, UDP, or ICMP. 6. Action: Defines what action to take if the packet matches the rule. Common actions are “allow” (permit) or “deny” (block).
How is the command for the iptables Syntax packet filtering made
On Linux systems using iptables, rules are defined differently:
iptables -A INPUT -p tcp –dport 80 -s 0.0.0.0/0 -d 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -j DROP
• -A INPUT appends the rule to the INPUT chain. • -p tcp specifies the protocol (TCP). • --dport 80 specifies the destination port (80). • -s 0.0.0.0/0 specifies any source IP address. • -d 192.168.1.0/24 specifies the destination subnet. • -j ACCEPT allows matching packets. • -j DROP drops all other packets.
What are state full packet filters?
Stateful packet filtering, also known as stateful inspection or dynamic packet filtering, is a more advanced method of network traffic management compared to traditional stateless packet filtering. It tracks the state of active connections and makes decisions based on the context of the traffic, rather than just the individual packets.
What are the functionalities of a state full package filter?
Include network packet filters, plus:
- keep track of the TCP state machine
- We can track connections without adding a response rule
- make deny rule safer
See the picture 7 in the Comp Sec album.
Define rules to allow access to internet statically
See the picture 7S in the Comp Sec album
See the picture 7 in the Comp Sec album
Create a rule to allow incoming connection to the WS on port 80 dynamically
See the picture 8S in the Comp Sec album
How Stateful Packet Filtering Works?
What are the disadvantages of a dynamic packet filter?
Performance bounded on a per-connection basis, not on a per-packet basis.
● The number of simultaneous connections are just as important as packets per second.
What is session handling?
A session is an atomic, transport-layer
exchange of application data between 2 hosts.
What are the main protocols responsible for session handling
Main transport protocols:
● TCP (Transmission Control Protocol) ○ session =~ TCP connection
● UDP (User Datagram Protocol)
○ session = this concept does not exist
What is a NAT session handling using TCP
Key Concepts
How does a NAR session initialization occurs using TCP?
How does a NAT initialization occurs using UDP