How the Internet Works
Chapters and transcript
How the Internet Works Every time someone in this office opens a website, their laptop sends messages across the internet, and the page appears in about a second. But the laptop only knows a name, like shop dot example. So how does it find the right server? Let us follow one request, step by step.
IP addresses First, every device on the internet has an IP address. Think of it as a home address for computers. An IPv4 address looks like this: four numbers separated by dots. There is also a newer, longer format, called IPv6.
IP addresses At home, your Wi-Fi router gives your devices private addresses, often starting with one nine two dot one six eight. These only work inside your home. When you go online, the router shares one public address with the internet.
DNS People remember names, but computers use numbers. DNS turns a name into an IP address. Watch. You type shop dot example. Your laptop asks a DNS server, what is the IP for shop dot example? The DNS server replies with an IP address. Now your browser connects to that IP.
DNS in action Let me show you on the laptop, using our practice network. I type the address and press enter. The browser first looks up the name. Then it connects to the IP address it got back, on port four four three. And the page loads.
DNS This is why attackers sometimes try to tamper with DNS. If the answer is changed, the real name sends you to a fake server, and you may not notice anything is wrong.
Ports One server can run many services at the same time. Ports are numbered doors that keep them apart. Port twenty-two is SSH, for remote login. Port fifty-three is DNS. Port eighty is plain HTTP, and port four four three is HTTPS. Port thirty-three oh six is MySQL databases, and thirty-three eighty-nine is Windows remote desktop.
Ports Attackers often scan a target to see which ports are open. Here, the database port and the remote desktop port answer from the internet. That is a common way in. So defenders close every port that is not needed, and keep only the website open.
Quick check Quick check. A company has its database port open to the whole internet, but only its own website needs the database. What should the defender do? Take a moment, then choose.
TCP and UDP Data travels in small pieces called packets, and two main protocols carry them. TCP is reliable. It checks that everything arrives, in order, so web pages and email use it. UDP is faster, but it does not check. Video calls, games and DNS often use it.
HTTP and HTTPS Websites use HTTP. The problem is that plain HTTP sends everything as readable text. Anyone on the same network, like public Wi-Fi, could read it. HTTPS adds encryption, using a protocol called TLS. Now the data is scrambled between your browser and the server.
HTTP and HTTPS One important warning. Look at this page. It has the padlock, so the connection is encrypted. But the padlock does not mean the website is honest. Scam websites use HTTPS too. Look at the domain: this is not the real shop. Always check the domain name.
Putting it together Let us put it together. When you open a secure website: DNS finds the server IP address. Your browser connects to that IP on port four four three. TLS sets up encryption. And your browser sends an HTTP request and receives the page. Every one of these steps can be attacked, and every one has defences. Now read the lesson below, and answer the quiz to unlock the next one.
You cannot secure something you do not understand. This lesson explains what happens when you open a website, in plain language.
IP addresses
Every device on the internet has an IP address, like a home address for computers. An IPv4 address looks like this:
104.21.32.15
There is also a newer, longer format called IPv6. Your home Wi-Fi router gives your devices private IP addresses (often starting with 192.168.), and shares one public IP address with the internet.
DNS: the internet's phone book
People remember names, computers use numbers. DNS (Domain Name System) turns a name like securek.co into an IP address.
- You type
securek.coin your browser - Your device asks a DNS server: "What is the IP for securek.co?"
- The DNS server replies with an IP address
- Your browser connects to that IP
Attackers sometimes try to tamper with DNS, so that a real name sends you to a fake server.
Ports and services
One server can run many services at the same time. Ports are numbered doors that separate them. Some common ones:
| Port | Service | Used for |
|---|---|---|
| 22 | SSH | Remote login to servers |
| 53 | DNS | Name lookups |
| 80 | HTTP | Websites (not encrypted) |
| 443 | HTTPS | Websites (encrypted) |
| 3306 | MySQL | Databases |
| 3389 | RDP | Remote desktop on Windows |
Attackers often scan a target to see which ports are open. An open database or remote desktop port on the internet is a common way in. Defenders close every port that is not needed.
TCP and UDP
Data travels in small pieces called packets. Two main protocols carry them:
- TCP is reliable. It checks that everything arrives, in order. Web pages and email use it.
- UDP is faster but does not check. Video calls, games and DNS often use it.
HTTP and HTTPS
Websites use HTTP. The problem: plain HTTP sends everything as readable text. Anyone on the same network, such as public Wi-Fi, could read or change it.
HTTPS adds encryption using a protocol called TLS. The data is scrambled between your browser and the server, so others on the network cannot read it.
Important: the padlock only means the connection is encrypted. It does not mean the website is honest. Scam websites use HTTPS too. Always check the domain name.
Putting it together
When you open https://securek.co:
- DNS finds the server's IP address
- Your browser connects to that IP on port 443
- TLS sets up encryption
- Your browser sends an HTTP request and receives the page
Every one of these steps can be attacked, and every one has defences. You will see many of them in this platform.
Check your understanding
Answer every question correctly to complete this lesson. If you miss one, try the quiz again.
1. What does DNS do?
2. Which port does HTTPS normally use?
3. What does the padlock (HTTPS) in your browser tell you?
Locked: answer every quiz question above correctly to complete this lesson.
Spotted a mistake or something unclear? Report a mistake