Extending Your Network
Overview — A networking fundamentals room about how a local network is extended and protected: port forwarding, stateful versus stateless firewalls, VPN technologies (PPP, PPTP, IPsec), and the roles of routers and switches (including layer 3 switching and VLANs). Two browser-based practicals let you write a firewall rule and watch a TCP exchange cross a simulated network.
| Platform | TryHackMe |
| Category | Fundamentals |
| Difficulty | Easy |
| Room | Extending Your Network |
Task 1 — Introduction to Port Forwarding
Devices on a private network normally use addresses (such as 192.168.x.x) that are not routable on the Internet, and the router's NAT hides them behind one public address. That is why a web server on your LAN is invisible from outside by default. Port forwarding is a rule on the router that says "traffic arriving on public port X goes to internal host Y, port Z". It is what lets a game server, web server or camera be reached from the Internet, and it is also an exposure: every forwarded port is attack surface that anyone can probe.
Q: What is the name of the device that is used to configure port forwarding?
A: router
Task 2 — Firewalls 101
A firewall sits at a network boundary and permits or denies traffic according to rules. Typical match criteria are the source, the destination, the port and the protocol (TCP, UDP or both). Firewalls range from dedicated appliances in a company, through home routers, to software such as the host firewall on your PC. They can be grouped by how much context they use; the room covers the two main kinds.
| Type | Decides based on | Strengths | Weaknesses |
|---|---|---|---|
| Stateful | The whole connection and its state (for example, a completed TCP handshake) | Understands context, can block a misbehaving host entirely | Needs more memory and CPU because it tracks every connection |
| Stateless | Each packet in isolation against static rules | Very fast and cheap, good against floods from known sources | Only as good as its rules; a packet that matches no rule is not understood |
Both work mostly at the network layer (3, IP addresses) and the transport layer (4, ports and TCP/UDP), which is why they filter on addresses and ports and not on application content. Inspecting content takes application-layer firewalls such as a WAF.
Q: What layers of the OSI model do firewalls operate at?
A: 3 & 4
Q: What category of firewall inspects the entire connection?
A: stateful
Q: What category of firewall inspects individual packets?
A: stateless
Task 3 — Practical: Firewall
The task deploys a static web page that shows packets flowing towards a web server. Malicious packets are red and legitimate ones green. The job is to add a rule that blocks the malicious traffic, which targets port 80 on the server, without cutting off the good traffic. Matching on the right combination of source, destination, port and action is the whole exercise; once the red packets are dropped the page reveals the flag.
Q: What is the flag?
A: FLAG
Task 4 — VPN Basics
A Virtual Private Network builds an encrypted tunnel between devices across the Internet so that they behave as if they were on one private network. The main benefits are:
- Connecting sites: offices in different cities can reach each other's servers as if on one LAN.
- Privacy: encryption stops someone on the path, for example on open public Wi-Fi, from reading the traffic.
- Anonymity, with limits: your ISP no longer sees the destinations, but the VPN provider does, so you are only as anonymous as the provider is trustworthy and non-logging.
TryHackMe itself relies on this: you join its lab network over a VPN, so the vulnerable machines are never exposed to the Internet, and your ISP sees only an encrypted tunnel and not scans against other hosts.
| Technology | What it is |
|---|---|
| PPP | Point-to-Point Protocol. Provides authentication and (optionally) encryption between two endpoints, but cannot cross networks by itself because it is not routable. |
| PPTP | Point-to-Point Tunneling Protocol. Wraps PPP so it can travel across the Internet. Easy to set up and widely supported, but its encryption is weak and it is considered insecure today. |
| IPsec | Encrypts traffic using the IP framework itself. Harder to configure, but offers strong encryption and wide support, which is why it still underpins many site-to-site VPNs. |
Q: What VPN technology only encrypts & provides the authentication of data?
A: PPP
Q: What VPN technology uses the IP framework?
A: IPSec
Task 5 — LAN Networking Devices
Routers connect different networks and forward packets between them, working at layer 3 using IP addresses. When several paths exist, routing protocols pick one based on factors such as the shortest path, the most reliable one or the fastest medium (copper versus fibre). Routers also host the rules for port forwarding and firewalling, usually through a web or console interface.
Switches connect many devices inside one network over Ethernet. A layer 2 switch learns which MAC address lives on which port and forwards frames only to the right device, instead of broadcasting to everyone like a hub. A layer 3 switch adds routing: it forwards frames and can also route IP packets between subnets (for example 192.168.1.0/24 and 192.168.2.0/24), taking over some router work at LAN speed.
VLANs (Virtual LANs) split one physical switch into several logical networks. Devices in different VLANs, say Sales and Accounting, can both reach the Internet through the same switch and router yet cannot talk to each other unless a rule allows it. That segmentation limits how far an intruder or a mistake can spread.
Q: What is the verb for the action that a router does?
A: routing
Q: What are the two different layers of switches? Separate these by a comma I.e.: Layer X,Layer Y
A: Layer 2,Layer 3
Task 6 — Practical: Network Simulator
The second practical is a static site simulating a small network with several computers, switches and a router. Sending a TCP packet from computer1 to computer3 makes the tool walk through every hop and log each step, including the ARP lookups and the TCP three-way handshake (SYN, SYN-ACK, ACK). Let the simulation finish completely, because the flag only appears at the end. Afterwards, count the lines labelled HANDSHAKE in the Network Log.
Q: What is the flag from the network simulator?
A: FLAG
Q: How many HANDSHAKE entries are there in the Network Log?
A: 5
Key takeaways
- Port forwarding makes an internal service reachable from the Internet; it is configured on the router and every rule widens the attack surface.
- Firewalls filter at layers 3 and 4. Stateful ones track whole connections; stateless ones judge packets one at a time and are cheaper but less flexible.
- VPNs create encrypted tunnels: PPP authenticates, PPTP carries it across the Internet but is weak, and IPsec is strong but complex.
- Routers move traffic between networks (layer 3); switches move frames within a network (layer 2, or 3 for routing-capable models).
- VLANs segment a network logically, a basic but effective way to contain compromise.