Lesson 15: Networks and Wi-Fi: How Data Travels and Where It Leaks
When you send a message or load a page, your data does not travel straight to its destination: it hops through a chain of devices, your home router, your internet provider's equipment, and a series of routers across the world, each passing the data to the next. Understanding that journey matters for security, because every hop is a place data could be seen, changed or blocked, and the protections you have learned so far, encryption, authentication and TLS, exist to make that journey safe even though the path itself is not trusted. This lesson follows a packet across the network, explains what Wi-Fi adds to the risk, and shows you how to use public networks safely.
Packets, routers and IP addresses
Data travels in packets, small chunks each labelled with a source address, a destination address and a sequence number, so the receiving end can reassemble them in order. Your device has an IP address on your local network, given by your router, and the router has a public IP address on the internet, so your traffic is translated as it leaves the house, a process called NAT. Routers read the destination address on each packet and forward it towards its goal, and the path can change from one packet to the next, which is why the internet keeps working when a link fails. None of this is secret: the addresses on a packet must be readable for it to be delivered, which is why the contents, not the envelope, are what encryption protects, and why TLS matters so much on networks you do not control.
Wi-Fi: a shared medium
Wi-Fi is different from a cable, because radio waves go everywhere: anyone nearby can receive them, which is why Wi-Fi must be encrypted. Modern Wi-Fi uses WPA2 or WPA3, which encrypt the traffic between your device and the router with a key derived from the network password, so neighbours cannot read it. But the password is shared by everyone on the network, which means anyone with the password can, with the right tools, decrypt other users' traffic on some networks, and an open network with no password at all encrypts nothing, so anyone nearby can read everything that is not separately protected. That is the key point: Wi-Fi encryption protects you from people outside the network, but on a public network, you should assume someone is listening, and rely on TLS and a VPN to protect the traffic itself.
Public Wi-Fi and VPNs
Public Wi-Fi in a café, a library or an airport is convenient and risky, and the risks are specific enough to defend against. The first is eavesdropping: on an open network, unencrypted traffic can be read by anyone nearby, so never enter a password or a card number on a site without HTTPS, and check for the padlock every time. The second is the evil twin: an attacker sets up a network with a familiar name, such as “Free_Cafe_WiFi”, and visitors who join it send their traffic through the attacker's computer, so ask staff for the real network name before joining. A VPN, a virtual private network, helps by encrypting all of your traffic and sending it through the VPN provider's server, so the local network sees only encrypted data, but it moves your trust from the café to the VPN provider, so choose one with a clear privacy policy and a good reputation, and remember that a VPN does not make a malicious site safe, it only protects the journey.
What leaks even when traffic is encrypted
Encryption protects the contents of your traffic, but it does not hide everything. An observer can still see which sites you visit, because the destination address and the site name are visible when the connection is set up, and they can see how much data you send and when, which can reveal patterns, such as when you are home or awake. That metadata is the reason tools such as DNS over HTTPS exist: they encrypt the name lookups that used to be visible to anyone on the network, and you can turn DNS over HTTPS on in most browsers' settings. The broader lesson is that privacy is about more than encryption: it is about knowing what each protection covers and what it leaves visible, so that you can choose the right tool for the risk you actually face, which is the subject of the next lesson.
Key Terms
- Packet
- A small chunk of data, labelled with source and destination addresses, that travels across a network.
- Router
- A device that forwards packets towards their destination, reading the address on each one.
- NAT
- Network address translation, which lets several devices share one public IP address through a router.
- WPA2 / WPA3
- The standards that encrypt Wi-Fi traffic between a device and a router.
- Evil twin
- A fake Wi-Fi network with a familiar name, set up to intercept the traffic of people who join it.
- VPN
- Virtual private network, which encrypts all of your traffic and sends it through the provider's server.
- DNS over HTTPS
- Encrypting the name lookups your browser makes, so they are not visible on the network.
Discussion Questions
- Why does encryption protect the contents of your traffic but not the fact that you visited a site?
- A café offers free Wi-Fi with no password. What would you do, and what would you avoid doing on it?
- A VPN moves your trust from the café to the VPN provider. What does that mean in practice?
Practice Questions
- What is a packet?
- Why must Wi-Fi be encrypted?
- What is an evil twin attack?
- How does a VPN help on public Wi-Fi?
- What can an observer still see even when your traffic is encrypted?
Show answers
- A small chunk of data, labelled with source and destination addresses. The receiving end reassembles packets in order to rebuild the original message.
- Because radio waves go everywhere and anyone nearby can receive them. Without encryption, anyone in range could read the traffic.
- A fake Wi-Fi network with a familiar name, set up to intercept traffic. Visitors who join it send their data through the attacker's computer.
- It encrypts all of your traffic and sends it through the provider's server. The local network then sees only encrypted data, though you must trust the VPN provider instead.
- Which sites you visit, how much data you send, and when. Encryption hides the contents, but the destination and the pattern of traffic remain visible.