A firewall is software or hardware that restricts access to your network.
The firewall decides what data is allowed through the connection, and can block risky connections, or connections from specific computers (e.g. a hacker).
Firewalls prevent unauthorized access to a network by filtering traffic. However, they do not block viruses—antivirus software is required for that.
A firewall can be used to:
check that incoming packets meet specific rules before being allowed in
set rules about which stations on a network can send or receive packets
Rules are created that take account of the following:
sender (source) IP address
receiver (destination) IP address
port numbers
protocols
Firewalls = Security Guards at a Club 🏢🔒
A firewall is like the bouncer at a nightclub.
It checks the guest list (rules) and decides who gets in.
If someone shady shows up (e.g., a hacker or untrusted connection), the bouncer blocks them at the door.
However, a bouncer doesn’t check what’s in your drink—that’s the job of antivirus software (which scans for hidden threats like malware).
Hacking Without a Firewall = Leaving Your Front Door Open 🚪💻
Not having a firewall is like leaving your house unlocked—anyone can walk in and mess with your stuff.
A firewall acts as a door lock, only letting in trusted people (safe connections).
You can also set extra rules, like only letting in family members (specific IPs) while blocking strangers.
Data can be protected with encryption. When you encrypt data, it becomes coded, or unreadable, so that only the intended recipient can understand it.
We usually encrypt sensitive data when we send it over the Internet. This means that even if a criminal got access to the data, it wouldn’t make sense to them, as it would be scrambled and unreadable. WhatsApp routinely encrypts all messages sent across its network.
The data is encoded using a key and once the data is sent the receiver uses the decryption key to decode the data.
Encryption = Locking a Letter in a Safe ✉️🔐
Imagine sending a letter in the mail. If you send it as-is (plain text), anyone can read it.
But if you lock it in a safe (encryption), only the person with the key (decryption key) can open it.
Symmetric encryption = You both share the same key to unlock it.
Asymmetric encryption = You use a padlock (public key) to lock it, but only the recipient has the special key (private key) to open it.