Chrysolites Open Courses

Cybersecurity Topics: Threats, Defences and Careers · Course book

Chapter 7: Network Defences

Pairs with Lesson 7: Network Security at Every Layer

A network is the road system of an organisation: every email, file transfer, video call and database query travels along it. If an attacker can reach that road system, they can try to intercept traffic, reach poorly protected computers or move from one system to the next. Network security is the set of policies, devices and practices that control who and what can use the network, protect traffic as it travels and detect misuse. This chapter explains why network security is needed, how protection is applied at different layers of the network, from IPsec at the network layer to TLS at the transport layer and secure email at the application layer, and how businesses design their networks with firewalls, segmentation, VPNs and secure Wi-Fi. A worked example shows exactly how a firewall decides which traffic to allow.

Why networks need protecting

The internet's core protocols were designed in the 1970s and 1980s for a small community of researchers who largely trusted one another. They focused on getting data delivered reliably, not on keeping it private or proving where it came from. An ordinary IP packet carries its source and destination addresses in plain view, and its source address can be forged. Older application protocols, such as Telnet for remote login and plain FTP for file transfer, sent usernames and passwords as readable text. Security has therefore had to be added on top, layer by layer.

The threats to a network include eavesdropping on traffic, tampering with data in transit, impersonation of trusted devices or servers, unauthorised access to internal systems, and denial of service that floods links or devices. A further danger is lateral movement: once an attacker controls one machine, such as a laptop infected through a phishing email, a flat network in which every device can reach every other lets them spread quickly. Good network design assumes that some device will eventually be compromised and limits how far an attacker can go from there.

Security at different layers

Because networking is organised in layers, protection can be applied at several of them, and each choice protects a different amount of traffic in a different way.

LayerProtocol or methodWhat it protectsTypical use
ApplicationS/MIME and PGP for email; HTTPS for the webIndividual messages or web sessionsSigned and encrypted email; secure websites
TransportTLS (Transport Layer Security)A single connection between two programsWebsites, apps, email between servers
NetworkIPsecAll IP traffic between two devices or networksSite-to-site VPNs linking offices
LinkWPA3 for Wi-Fi; port security on switchesTraffic on one local network segmentOffice and home wireless networks

At the network layer, IPsec protects every IP packet between two endpoints, whatever application produced it. It can authenticate packets, so the receiver knows they came from the claimed sender and were not changed, and encrypt them for confidentiality. Because it works beneath the applications, programs need no changes, which makes IPsec the usual choice for joining two office networks over the internet.

At the transport layer, TLS protects individual connections between a client and a server. It authenticates the server using a certificate, agrees a fresh session key using a key exchange, and then encrypts and integrity-checks everything sent over the connection. TLS is what turns HTTP into HTTPS, and it also protects email transfer between mail servers and countless mobile apps.

At the application layer, protection can travel with the data itself. An email signed and encrypted with S/MIME or PGP stays protected while it sits in mailboxes and passes through servers, not just while it crosses each network link. The general rule is that the higher the layer, the more precisely protection can be targeted, while lower layers protect more traffic at once with less effort from each application.

Firewalls and how they decide

A firewall controls which traffic may pass between networks, or into and out of a single computer, according to a set of rules. A basic packet-filtering firewall examines each packet's addresses, protocol and port numbers. A stateful firewall also remembers connections that have been opened, so that replies to an internal user's request are allowed back in while unsolicited traffic from outside is not. Next-generation firewalls go further, recognising applications, inspecting content and integrating threat intelligence.

Most firewalls read their rule list from top to bottom and apply the first rule that matches. The last rule is usually a default deny, blocking anything not explicitly allowed. This means rule order matters as much as rule content.

Worked example. A small company's firewall protects its web server at address 10.0.1.5 and has these rules, checked in order. Rule 1: allow any source to 10.0.1.5 on TCP port 443 (HTTPS). Rule 2: allow the office network 192.168.10.0/24 to 10.0.1.5 on TCP port 22 (SSH, for administrators). Rule 3: deny any source to 10.0.1.5 on TCP port 22. Rule 4: deny everything else.

A visitor at 203.0.113.7 connects to port 443: rule 1 matches, so the connection is allowed. An administrator at 192.168.10.20 connects to port 22: rule 1 does not match, rule 2 does, so it is allowed. An attacker at 198.51.100.9 tries port 22: rules 1 and 2 do not match, rule 3 does, so it is blocked. Someone tries remote desktop on port 3389: nothing matches until rule 4, so it is blocked. If rule 3 had been placed above rule 2, the administrators would also have been blocked, because the first matching rule wins.

Firewall rule sets tend to grow over the years as exceptions are added and rarely removed. Regular reviews remove rules that are no longer needed, tighten ones that are too broad, such as "allow any to any", and check that every rule has a recorded owner and purpose.

Designing a defensible network

Beyond individual firewalls, the overall design of a network determines how well it resists attack. Segmentation divides a network into zones that can communicate only through controlled points. A common design places public-facing servers in a separate zone, often called a DMZ (demilitarised zone), between the internet and the internal network. If a web server in the DMZ is compromised, the attacker still faces another firewall before reaching staff computers and internal databases.

Internet firewall DMZweb servermail server firewall Staff networklaptops, printers Server zonedatabases, files Guest Wi-Fiinternet access only
Figure 7.1 — A segmented network. Public servers sit in a DMZ, and internal zones are separated so that a compromise in one area cannot easily spread to the others.

Inside the organisation, further segments might separate staff computers, servers, payment systems, building management devices and guest Wi-Fi, with rules allowing only the traffic each zone genuinely needs. Network access control checks devices when they connect, for example confirming that a laptop is company-managed and up to date before placing it on the staff network, and sending unknown devices to a restricted zone.

A virtual private network (VPN) creates an encrypted tunnel across the internet, either between two offices or between a remote worker's device and the company network. VPNs protect traffic in transit, but a VPN that grants full network access to any device with a valid password becomes an attractive target, so it should require multi-factor authentication and, ideally, give each user access only to the systems they need, in line with the Zero Trust approach.

Wireless networks need their own care. Current Wi-Fi security, WPA3, protects against password-guessing attacks better than its predecessor WPA2. Businesses typically give staff individual credentials rather than one shared password, keep guest Wi-Fi completely separate from internal systems, and change default administrator passwords on access points. Finally, monitoring ties everything together: logs from firewalls, VPNs and network devices, collected centrally and reviewed, reveal scanning, unusual connections and attempts to reach blocked zones.

Network security for a small business

Large organisations employ teams of network engineers, but even a small business with a single office can apply the same principles at low cost. A sensible baseline includes a router or firewall with up-to-date firmware and a changed administrator password; remote administration turned off unless it is genuinely needed; WPA3 or, at minimum, WPA2 with a long passphrase for staff Wi-Fi; a separate guest network for visitors and customers; no services such as remote desktop exposed directly to the internet; a VPN with multi-factor authentication for remote access; and automatic updates on every device. Payment card terminals and building devices, such as cameras, are best kept on their own segment.

Each of these measures is modest, but together they close the routes most commonly used against small organisations: exposed remote access, default passwords, flat networks and unpatched equipment. Network security is less about buying the most advanced device and more about knowing what is connected, allowing only what is necessary and noticing when something changes.

Check your understanding

  1. Give two reasons why the internet's original protocols are insecure by modern standards.
  2. Compare IPsec and TLS: at which layer does each work, and what does each protect?
  3. Using the worked example's rule list, decide whether these are allowed or blocked: 192.168.10.33 to port 443; 198.51.100.9 to port 80.
  4. Explain why the order of firewall rules matters, using an example.
  5. Describe the purpose of a DMZ and what it achieves if a web server is compromised.
  6. List five measures you would recommend for the network of a small café that offers customers free Wi-Fi.

Install Chrysolites Open Courses

Android / Chrome / Edge: open the browser menu and choose Install app or Add to Home screen.

iPhone / iPad (Safari): tap the Share button, then Add to Home Screen.