A firewall controls what enters and leaves a network: it allows or blocks each connection according to rules. It is the first barrier between your network and the Internet. This guide explains what a firewall is, how it works, what its functions are (VPN, IPS) and how to choose a firewall for a business.
Firewall: definition
A firewall is a device or a piece of software placed between two networks, for example your local network and the Internet. It examines the traffic passing through and applies rules: address, port, protocol, sometimes the application or the user. Traffic that matches the rules goes through; the rest is blocked.
How does a firewall work?
- Rule-based filtering: the firewall compares each packet with the rules (IP address, port, protocol) and decides whether to allow or block it.
- Stateful inspection (SPI, Stateful Packet Inspection): it tracks connections opened from the local network and lets back in only the expected replies.
- NAT and port forwarding: it translates addresses and exposes an internal service, such as a server or a camera, only if you create a rule.
- Application inspection and IPS: modern firewalls recognize applications and detect intrusion attempts (IDS/IPS) from threat signatures.
Hardware, software or cloud firewall?
| Type | Where it runs | Typical use |
|---|---|---|
| Software firewall | On a computer, built into the system | Protects a single workstation |
| Hardware firewall | Dedicated box at the network entrance | Protects the whole network of an office, a hotel or an industrial site |
| Cloud-managed firewall | Local box administered remotely from the cloud | Several sites to manage from a single console |
A software firewall does not replace a hardware firewall: the first protects one workstation, the second protects every device on the network, including those with no security software, such as IP cameras and printers.
Firewall, router or NGFW: what is the difference?
- Router: it connects the network to the Internet and includes a basic firewall (NAT, SPI). See the Wi-Fi router guide to compare them.
- Firewall: finer rules, logs, VPN, several Internet lines and VLANs. Example: the PLANET CSG-800, a 10 Gbps firewall with IDS/IPS and layer 7 application inspection.
- NGFW (Next-Generation Firewall): a firewall that adds application recognition, intrusion prevention (IPS) and filtering by application or by user to classic inspection. EnGenius ESG firewalls include a layer 7 application firewall and IDS/IPS.
Useful functions of a professional firewall
- Site-to-site VPN: link two branches or a warehouse in an encrypted private network. EnGenius ESG firewalls handle mesh and hub-and-spoke VPNs.
- Remote-access VPN: an employee connects to the company network from home, with IPsec or SSL. The PLANET XVR-800 adds OpenVPN and WireGuard.
- IDS/IPS: detects and blocks known attacks before they reach a server or a workstation.
- Dual WAN: two Internet lines, with load balancing or automatic failover if one line goes down.
- VLAN and captive portal: separate cameras, workstations and guest Wi-Fi, and ask visitors of a hotel or a café to log in.
- Logs and monitoring: the history of blocked connections helps to understand an incident.
How to choose a firewall?
- Throughput: the advertised “firewall” (SPI) throughput is the highest figure. As soon as IPS, VPN or application inspection is on, the usable throughput drops: also compare the IPS and VPN throughput.
- VPN tunnels and users: from 100 tunnels on the ESG320 to 300 on the ESG610 and ESG620.
- Ports: Gigabit, 2.5G or 10G, and SFP for fiber. The CSG-800 has a 10GBASE-T port and an SFP+ port.
- Built-in PoE: the ESG620 powers up to four Wi-Fi access points or cameras (120 W PoE budget).
- Management: local web interface, cloud or SNMP, depending on your IT team.
- Security services: check whether updates and IPS functions require a subscription from the manufacturer.
The four EnGenius ESG firewalls in the catalog, with the values announced by the manufacturer:
| Model | Ports | Firewall (SPI) | VPN | VPN tunnels | IPS |
|---|---|---|---|---|---|
| ESG320 | 4 × Gigabit (1 PoE+), 1 SFP | 3 Gbps | 900 Mbps | 100 | 650 Mbps |
| ESG510 | 4 × 2.5G (1 PoE+) | 4 Gbps | 970 Mbps | 200 | 700 Mbps |
| ESG610 | 4 × 2.5G (1 PoE+) | 6.8 Gbps | 1.5 Gbps | 300 | 1.2 Gbps |
| ESG620 | 8 × 2.5G (4 PoE+), 2 SFP+ | 9.5 Gbps | 1.7 Gbps | 300 | 1.2 Gbps |
On the PLANET side, the catalog includes firewalls, VPN gateways and security routers:
| Model | Type | Highlights |
|---|---|---|
| CSG-800 | 10 Gbps firewall | 4 Gigabit ports, 1 10GBASE-T port, 1 SFP+ port; NAT throughput up to 9.4 Gbps; IDS/IPS |
| XVR-800 | 10 Gbps VPN gateway | Same ports; IPsec, OpenVPN, WireGuard |
| VR-300 | Gigabit VPN router | 5 Gigabit ports; NAT up to 900 Mbps; 60 VPN tunnels |
| VR-100 | Gigabit security router | 5 Gigabit ports; NAT up to 900 Mbps; 60 VPN tunnels |
Where should the firewall go in the network?
The firewall goes at the network entrance, between the operator’s box or optical terminal and the rest of the installation: switch, Wi-Fi access points, servers and cameras. A separate zone, the DMZ, hosts the servers reachable from the Internet, so that a compromise does not reach the internal network.
For video surveillance, cameras go in a separate VLAN, on a managed switch, behind the firewall.
Common mistakes
- Leaving the firewall administration open to the Internet.
- Keeping factory passwords or never updating the firmware.
- Creating rules that are too broad, such as “allow all” for testing, then forgetting them.
- Comparing two firewalls on SPI throughput alone, without looking at throughput with IPS and VPN.
- Forgetting remote-access VPN and the configuration backup.
Frequently asked questions
What is the difference between a firewall and an antivirus?
An antivirus protects a computer against malicious files. A firewall filters network connections. The two complement each other and do not replace each other.
Does a small business need a hardware firewall?
It is recommended as soon as the company has servers, cameras, guest Wi-Fi or remote work: a hardware firewall protects every device and handles the VPN.
Is a router enough instead of a firewall?
A router’s built-in firewall blocks unsolicited incoming connections, which is enough for a small network. For VPN between several sites, IPS or filtering by application, a dedicated firewall is a better fit.
What is an NGFW?
A Next-Generation Firewall: it adds application recognition, intrusion prevention and user-based filtering to classic inspection.
How much does a firewall cost in Morocco?
The price depends on throughput, the number of ports and VPN functions. PINET firewalls are offered on request: tell us the number of users and sites and the team will point you to the right model.
Where can I buy a firewall in Morocco?
From PINET in Casablanca: PLANET and EnGenius firewalls and VPN routers, delivery anywhere in Morocco, price on request.






















