A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on a set of security rules. It acts as a barrier between a trusted internal network and untrusted external networks (such as the internet).
| Type | How it works | Pros & Cons |
|---|---|---|
| Packet Filtering | Examines packet headers only (source/dest IP, port, protocol). Allows or blocks based on rules (ACLs). Stateless — each packet judged independently. | Fast, low overhead. Cannot detect sophisticated attacks that use multiple packets. |
| Stateful Inspection | Tracks the state of active connections. Knows whether a packet is part of an established connection or a new one. Far more context than packet filtering. | More secure than packet filtering. Higher overhead. |
| Application Layer (Proxy) Firewall | Inspects payload at the application layer — understands specific protocols (HTTP, FTP, DNS). Can detect malicious content within packets. | Most secure. Significant performance overhead. |
| Next-Generation Firewall (NGFW) | Combines stateful inspection + deep packet inspection + IDS/IPS + SSL inspection + application awareness. | Most comprehensive. Complex and expensive. |
A proxy server acts as an intermediary between a client and the internet. The client sends requests to the proxy; the proxy forwards them to the web server and returns the response.
Sits between internal clients and the internet. Used by organisations to:
Sits between the internet and internal web servers. Used by organisations to:
TLS is the protocol that provides HTTPS (secure HTTP). It provides:
TLS Handshake (simplified): client sends ClientHello (supported cipher suites) → server sends Certificate + ServerHello → client verifies certificate against trusted Certificate Authorities (CAs) → session keys established using asymmetric crypto → data encrypted with symmetric session key for speed.
| HTTP | HTTPS | |
|---|---|---|
| Port | 80 | 443 |
| Encryption | None — plaintext | TLS encryption |
| Authentication | None | Server verified via certificate |
| Integrity | None | MAC prevents tampering |
| Use | Non-sensitive pages | Login, payment, all modern sites |
| Symmetric | Asymmetric | |
|---|---|---|
| Keys | One shared secret key for both encrypt and decrypt | Public key (encrypt) + private key (decrypt) |
| Speed | Fast | Slow (~1000× slower) |
| Problem | Key distribution — how to securely share the key? | No key distribution problem — public key can be shared openly |
| Example algorithms | AES, DES | RSA, ECC |
| Used for | Bulk data encryption (session data) | Key exchange, digital signatures, authentication |
HTTPS uses a hybrid approach: asymmetric encryption is used in the TLS handshake to securely exchange a symmetric session key; that symmetric key is then used for all data in the session (faster).
A digital certificate is an electronic document that verifies the ownership of a public key. It contains: the public key, the domain it belongs to, the issuing CA, validity period, and a CA's digital signature.
Certificate Authorities (CAs) are trusted organisations (e.g. DigiCert, Let's Encrypt) that issue and sign certificates. Browsers have a built-in list of trusted CAs. When you visit an HTTPS site, the browser verifies the certificate was signed by a trusted CA — if so, the connection is trusted.
A self-signed certificate is not signed by a trusted CA — browsers show a "Not Secure" warning. Used only in internal/test environments.
| Threat | Mitigation |
|---|---|
| Eavesdropping / MITM | HTTPS/TLS encryption; digital certificates |
| Unauthorised access | Firewall rules; access control lists |
| Content restriction | Proxy server with content filtering |
| DDoS attack | Reverse proxy; rate limiting; ISP-level filtering |
| Phishing / fake sites | Certificate validation; browser warnings for invalid certs |
| Port scanning / reconnaissance | Firewall — block unused ports; IDS alerts on port scans |
8 questions · 20 marks · instantly marked
| Term | Definition |
|---|