Why you need a firewall?
Imagine your computer as a house with doors and windows. A firewall acts like the locks and security system, controlling who and what can come in and out. It’s a barrier between your system and the network (such as the internet), examining incoming and outgoing network traffic and blocking anything suspicious or unauthorized.
Firewalls work by analyzing network packets against a set of rules. These rules define what types of traffic are allowed or denied based on criteria such as the following:
- Source and destination IP addresses: Where the traffic is coming from and going to
- Ports: Specific communication channels applications use (for example, port 80 for web traffic)
- Protocols: Rules for communication (for example, TCP, UDP)
Ubuntu comes with a firewall pre-installed, but it’s disabled by default. Enabling and configuring it is crucial to secure your system.