DML School of Technology
Menu

Open to everyone Reading, lesson 35 of 100, 2 min read

Firewalls and segmentation

Firewalls

A firewall allows or blocks traffic according to rules. Rules usually look at the protocol, source and destination addresses, and destination port.

Key ideas, which the firewall lab lets you practise:

  • Rules are read from the top; the first match decides.
  • The default policy at the bottom should be deny.
  • Allow only what is needed, only from who needs it (least privilege).

Kinds of firewall

KindWhat it understands
Packet filterIndividual packets: addresses, ports, protocol
Stateful firewallConnections: it remembers that a reply belongs to a conversation started from inside
Next-generation firewallApplications and users, with intrusion prevention built in
Web application firewall (WAF)HTTP requests to websites, blocking common attacks such as injection
Host firewallRuns on each computer, protecting that machine alone

Segmentation

Segmentation splits a network into zones so that a problem in one does not spread to all. A school might have:

ZoneWho is thereCan reach
StaffStaff laptopsStaff servers, internet
StudentsLab PCs and student Wi-FiInternet and the learning platform only
GuestsVisitors' phonesInternet only
ServersRecords, financeOnly from specific staff systems
DevicesCCTV, printers, smart boardsOnly their management systems

Zones are separated with VLANs on switches and firewall rules between them. The DMZ (demilitarised zone) is a zone for servers that must be reachable from the internet, such as a public website, kept apart from internal systems.

Egress filtering

Most rules control what comes in. Controlling what goes out (egress) also helps: a server that only needs to reach the update service should not be able to connect anywhere on the internet, which makes it harder for malware to send data out.

Tip

Draw your network's zones on paper before writing any rules. Rules written without a picture tend to grow into an unreadable list that allows far too much.