Skip to the levels
ROOTSPIRE
DiscsFor teachers
▶ Play freeLibrary 16 discsDiscsFor teachersLog in

Every level, in the open

Networking

11 worlds · 151 levels · 11 bosses

SOLUTION HIDDENTeachers see answer keys in the classroom.

▶ Play this discAll discs
All discsLinux: Zero to RootBash ScriptingGitDatabasesPython for OpsLinux Sysadmin ProNetworkingObservabilityCloud & IaCDocker & ContainersCTF ArenaSOC FieldWindows for Linux peopleKubernetesAnsibleThe Guildhall: First Week

A real lab of hosts, wires and routers inside your VM. Packets are creatures: learn where they live, how they travel, and why they get lost.

Guided levels show the command first. Alone levels give the goal only. Bosses and exams are timed.

Jump to a world

World 1 Bits & LayersWorld 2 The WireWorld 3 The HiveWorld 4 CrossroadsWorld 5 Subnet DojoWorld 6 The Owl's LibraryWorld 7 The HarborWorld 8 The MarketWorld 9 The WallWorld 10 Leases & ClocksWorld 11 Six

World 1Bits & Layers

14 levels

Before the wires: light switches (bits), hex name tags (MACs), nesting dolls (layers) and the harbor signs (ports).

  1. 1

    Level 1: Light switches

    GuidedEasy

    Objective: Three times: read the 8 switches in ~/question.txt and tell Kern their value in decimal (e.g. kern 192).

    A byte is 8 light switches worth 128 64 32 16 8 4 2 1. Add the ones that are on. bash checks your sum: echo $((2#BITS)).

    Commands taughtbinary

    ▶ Play: Light switchesSOLUTION HIDDEN15 XP
  2. 2

    Level 2: Flip it

    GuidedEasy

    Objective: Three times: turn the number in ~/question.txt into 8 switches with bc and tell Kern (e.g. kern 10101100).

    Decimal to binary: take the biggest switch that fits, switch it on, subtract, repeat. bc does it for you: echo "obase=2; 172" | bc.

    ▶ Play: Flip itSOLUTION HIDDEN15 XP
  3. 3

    Level 3: Dotted quad

    GuidedEasy

    Objective: Twice: turn the 32 bits in ~/question.txt into a dotted address and tell Kern (e.g. kern 192.168.1.10).

    An IPv4 address is 32 switches: four octets with dots between them. 11000000.10101000.00000001.00001010 = 192.168.1.10.

    ▶ Play: Dotted quadSOLUTION HIDDEN20 XP
  4. 4

    Level 4: Masks are switches

    AloneMedium

    Objective: Three rounds: ~/question.txt holds a mask (kern its /N) or a /N (kern its mask).

    A netmask is a run of 1 switches, then 0s: 255.255.255.192 = 24 + 2 ones = /26. The /N after an address counts those ones.

    ▶ Play: Masks are switchesSOLUTION HIDDEN25 XP
  5. 5

    Level 5: Hex name tags

    GuidedEasy

    Objective: Read wire0's MAC, then turn its last byte into decimal.

    Hex counts to 15 in one digit (0-9 then a-f), so two hex digits = one byte. A MAC is a network card's 6-byte name tag, written in hex.

    ▶ Play: Hex name tagsSOLUTION HIDDEN20 XP
  6. 6

    Level 6: Layer cake

    GuidedEasy

    Objective: Catch one of the creatures meadow keeps sending you and name each layer.

    One line of tcpdump -e shows every layer of a packet: MACs (link), IP addresses (internet), ports (transport), and with -A the data (application).

    Commands taughtlayers

    ▶ Play: Layer cakeSOLUTION HIDDEN25 XP
  7. 7

    Level 7: Nesting dolls

    GuidedEasy

    Objective: Open the dolls of one of meadow's packets, one header at a time.

    Encapsulation: the data rides in a UDP datagram, inside an IP packet, inside an Ethernet frame. Each outer doll says what is inside the next one.

    ▶ Play: Nesting dollsSOLUTION HIDDEN25 XP
  8. 8

    Level 8: Private streets

    GuidedEasy

    Objective: Three in a row: is the address in ~/question.txt private or public? (kern private / kern public)

    Three ranges are private (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 (172.16 to 172.31) and 192.168.0.0/16. The internet never routes them: they live behind NAT.

    Commands taughtspecial-addresses

    ▶ Play: Private streetsSOLUTION HIDDEN20 XP
  9. 9

    Level 9: Home sweet home

    GuidedEasy

    Objective: Ping yourself on a strange 127 address, then find the interface that never got a DHCP answer.

    127.0.0.0/8 is loopback: every 127.x.y.z is your own machine. 169.254.0.0/16 (APIPA) is the address a host gives itself when no DHCP server answered.

    ▶ Play: Home sweet homeSOLUTION HIDDEN20 XP
  10. 10

    Level 10: Old classes

    AloneMedium

    Objective: Three rounds: tell Kern the class of the address in ~/question.txt (kern A / B / C / D).

    Before CIDR, the first octet set the class: A 1-126 (/8), B 128-191 (/16), C 192-223 (/24), D 224-239 (multicast). History, but interviews and old docs still use it.

    ▶ Play: Old classesSOLUTION HIDDEN20 XP
  11. 11

    Level 11: Harbor signs

    GuidedEasy

    Objective: Three rounds: tell Kern the /etc/services name of the port in ~/question.txt (kern ntp).

    Well-known services sail into well-known ports. /etc/services is the harbor sign: grep -w 123/udp /etc/services → ntp.

    Commands taughtservices

    ▶ Play: Harbor signsSOLUTION HIDDEN20 XP
  12. 12

    Level 12: Which layer broke?

    AloneMedium

    Objective: Three tickets in a row: tell Kern the layer of the problem in ~/question.txt (kern link / internet / transport / application).

    Triage from the bottom up: cable, link state, MAC → link; address, mask, route, ttl → internet. Port, refused, a firewall on a port → transport; names, HTTP codes, logins → application.

    ▶ Play: Which layer broke?SOLUTION HIDDEN30 XP
  13. 13

    Level 13: Harbor quiz

    Alone⏱ TimedHard

    Objective: Answer five questions in a row with kern ANSWER.

    Five right answers in a row, against the clock; a wrong answer resets the streak. Come back any time for more reps.

    ▶ Play: Harbor quizSOLUTION HIDDEN40 XP
  14. 14

    Level 14: BOSS: Annotate the capture

    Boss⏱ TimedHard

    Objective: Catch one of meadow's packets and annotate it: link, ethertype, internet, protocol, ttl, service, data.

    The network team wants one packet explained, layer by layer, with no help.

    ▶ Play: BOSS: Annotate the captureSOLUTION HIDDEN70 XP

World 2The Wire

11 levels

Where packets are born: interfaces, links up and down, addresses, MACs, and your first wires between hosts.

  1. 15

    Level 15: Roll call

    GuidedEasy

    Objective: A new wire just appeared on your machine: tell Kern its name (kern <name>).

    Every way in or out of a machine is an interface. ip link lists them; lo is the machine talking to itself.

    Commands taughtip-link

    ▶ Play: Roll callSOLUTION HIDDEN15 XP
  2. 16

    Level 16: Wake up

    GuidedEasy

    Objective: Bring your interface wire0 up.

    An interface that is DOWN is a closed door: no creature gets through. sudo ip link set NAME up opens it.

    ▶ Play: Wake upSOLUTION HIDDEN15 XP
  3. 17

    Level 17: An address

    GuidedEasy

    Objective: Give wire0 the address 10.0.1.1/24, then ping meadow at 10.0.1.2.

    An IP address is a home address: packets need one to be delivered and to find their way back. hidden gives wire0 one.

    Commands taughtip-addrping

    ▶ Play: An addressSOLUTION HIDDEN20 XP
  4. 18

    Level 18: The other side

    GuidedEasy

    Objective: Find meadow's IP address and tell Kern (kern <address>).

    Each host in this lab is a network namespace with its own interfaces. on meadow CMD runs CMD there (it is short for sudo hidden exec meadow CMD).

    Commands taughton

    ▶ Play: The other sideSOLUTION HIDDEN20 XP
  5. 19

    Level 19: Lay a wire

    GuidedEasy

    Objective: Lay a wire to orchard: a veth pair named wire5 (your end) and orch0 (orchard's end, moved into orchard).

    A veth pair is a virtual cable with two ends. Create one with ip link add A type veth peer name B, then move end B to a host with ip link set B netns HOST.

    Commands taughtveth

    ▶ Play: Lay a wireSOLUTION HIDDEN20 XP
  6. 20

    Level 20: Written down

    GuidedEasy

    Objective: Write a stanza for wire0 with the address 10.0.11.1/24 in /etc/network/interfaces, then bring it up with ifup so you can ping meadow (10.0.11.2).

    ip addr add is forgotten at reboot. A stanza in /etc/network/interfaces (auto DEV, iface DEV inet static, address A.B.C.D/NN) is applied at every boot, and sudo ifup DEV applies it now.

    Commands taughtinterfaces

    ▶ Play: Written downSOLUTION HIDDEN20 XP
  7. 21

    Level 21: Lights on

    AloneMedium

    Objective: Fix meadow so that ping 10.0.6.2 gets an answer.

    A wire has two ends, and each must be up.

    ▶ Play: Lights onSOLUTION HIDDEN25 XP
  8. 22

    Level 22: Name tag

    AloneMedium

    Objective: Tell Kern the MAC address of meadow's eth0.

    Under the IP, each interface wears a hardware name tag: its MAC address (link/ether). On one wire, delivery is by MAC.

    Commands taughtmac

    ▶ Play: Name tagSOLUTION HIDDEN25 XP
  9. 23

    Level 23: Rescue

    Alone⏱ TimedHard

    Objective: PAGER: make ping to meadow (10.0.8.2) work, with your wire0 (10.0.8.1/24) written in /etc/network/interfaces for the next boot.

    Pager time: links down, addresses gone, and last time the fix vanished at the next reboot.

    ▶ Play: RescueSOLUTION HIDDEN40 XP
  10. 24

    Level 24: Line-up

    Alone⏱ TimedHard

    Objective: The MAC in ~/suspect.txt belongs to one of the hosts h1, h2, h3: tell Kern which.

    A card with a known name tag went missing.

    ▶ Play: Line-upSOLUTION HIDDEN35 XP
  11. 25

    Level 25: BOSS: Two wires

    Boss⏱ TimedHard

    Objective: Wire orchard (you 10.0.1.1/24, orchard 10.0.1.2/24) and grove (you 10.0.2.1/24, grove 10.0.2.2/24), so both answer pings.

    Two new hosts, no cables at all. Everything from this world, from scratch.

    ▶ Play: BOSS: Two wiresSOLUTION HIDDEN60 XP

World 3The Hive

8 levels

Streets and house numbers: CIDR prefixes, networks and broadcasts, bridges where many hosts share one wire.

  1. 26

    Level 26: Street name

    GuidedEasy

    Objective: Tell Kern the network address of the street wire0 lives on (e.g. kern 10.20.3.64).

    The /26 after an address says how many leading bits name the street (the network); the rest number the houses. hidden shows the street an address joined.

    Commands taughtcidr

    ▶ Play: Street nameSOLUTION HIDDEN15 XP
  2. 27

    Level 27: Town crier

    GuidedEasy

    Objective: Tell Kern wire0's broadcast address.

    A street's last address is its broadcast: a creature sent there visits every house. ip addr shows it after brd.

    Commands taughtbroadcast

    ▶ Play: Town crierSOLUTION HIDDEN15 XP
  3. 28

    Level 28: Zoning

    GuidedEasy

    Objective: Zoning drill: for each order in ~/order.txt (3 in a row), tell Kern the smallest prefix whose street fits that many hosts (e.g. kern /27).

    Each prefix bit you give up doubles the street: /28 = 16 addresses, /27 = 32, /26 = 64. Two go to the network and broadcast addresses.

    ▶ Play: ZoningSOLUTION HIDDEN20 XP
  4. 29

    Level 29: Same street

    AloneMedium

    Objective: bee1 and bee2 share the bridge hive0 but can't talk: give bee2's eth0 an address on bee1's street.

    The bridge hive0 is a virtual switch, a power strip for network cables: everything plugged in shares one wire. Sharing a wire is not enough, they must share a street too.

    Commands taughtbridge

    ▶ Play: Same streetSOLUTION HIDDEN25 XP
  5. 30

    Level 30: Too narrow

    AloneMedium

    Objective: Fix bee3's 10.2.0.30 so it answers your ping again (you are 10.2.0.1/24 on hive0).

    A /32 is a street of one house: no neighbours, so replies have nowhere to go. ip addr del removes a wrong address.

    ▶ Play: Too narrowSOLUTION HIDDEN25 XP
  6. 31

    Level 31: Second home

    AloneMedium

    Objective: Without touching bee4 (10.3.1.5/24), make it answer your ping by giving hive0 a second address.

    One interface can hold several addresses, one per street it serves.

    ▶ Play: Second homeSOLUTION HIDDEN25 XP
  7. 32

    Level 32: Quick math

    Alone⏱ TimedHard

    Objective: Survey drill: 3 times in a row, tell Kern the network and broadcast of the address in ~/survey.txt (kern NETWORK BROADCAST).

    The surveyor is waiting, with three plots.

    ▶ Play: Quick mathSOLUTION HIDDEN40 XP
  8. 33

    Level 33: BOSS: The renumbering

    Boss⏱ TimedHard

    Objective: Make bees b1-b4 answer your ping at 10.6.0.11-14 (you are 10.6.0.1/24 on hive0).

    Four bees on hive0, four different kinds of broken. Keep each bee's host number.

    ▶ Play: BOSS: The renumberingSOLUTION HIDDEN60 XP

World 4Crossroads

11 levels

Where streets meet: routing tables, default gateways, routers that forward, ARP shouts and counting hops.

  1. 34

    Level 34: Signposts

    GuidedEasy

    Objective: Tell Kern which interface a packet to 10.77.5.9 leaves your machine through.

    Every host keeps a routing table: for each destination, which door and which next hop. hidden get ADDR asks which road a packet would take.

    Commands taughtip-route

    ▶ Play: SignpostsSOLUTION HIDDEN15 XP
  2. 35

    Level 35: The default road

    GuidedEasy

    Objective: Give village a default route via gate (10.32.2.1) so it can ping you at 10.32.1.1.

    For every street a host isn't on, it follows the default route to a gateway router. No default route, no way out.

    ▶ Play: The default roadSOLUTION HIDDEN20 XP
  3. 36

    Level 36: Open the gate

    GuidedEasy

    Objective: Turn gate into a router so you can ping village at 10.33.2.2.

    A host with two wires only passes packets between them when net.ipv4.ip_forward is 1. That switch (sysctl -w net.ipv4.ip_forward=1) makes it a router.

    Commands taughtip-forward

    ▶ Play: Open the gateSOLUTION HIDDEN20 XP
  4. 37

    Level 37: Who has?

    GuidedEasy

    Objective: Ping 10.35.0.12, then tell Kern its MAC address from your neighbour table.

    On a street, IP addresses become MACs by shouting "who has 10.35.0.12?" (ARP). hiddens the answers your machine remembers.

    Commands taughtarp

    ▶ Play: Who has?SOLUTION HIDDEN20 XP
  5. 38

    Level 38: Wrong number

    GuidedEasy

    Objective: ping 10.39.0.2 (meadow) fails: remove your wrong neighbour entry for it so the ping works.

    A neighbour entry marked PERMANENT is never re-asked: if its MAC is wrong, every packet goes to a house that does not exist. sudo hidden del ADDR dev DEV removes it, and the next ping shouts ARP again.

    ▶ Play: Wrong numberSOLUTION HIDDEN20 XP
  6. 39

    Level 39: For good

    GuidedEasy

    Objective: Your machine is the router between west (10.30.1.2) and east (10.30.2.2): turn forwarding on now and for every boot, with a file in /etc/sysctl.d/.

    sysctl -w is forgotten at the next reboot. A line in a file under /etc/sysctl.d/ is applied at every boot; sudo sysctl -p FILE applies it right now too.

    ▶ Play: For goodSOLUTION HIDDEN20 XP
  7. 40

    Level 40: The way back

    AloneMedium

    Objective: Add the route your machine is missing so that ping 10.34.2.2 works.

    Routes are one-way signposts. Your machine needs its own sign to the far street.

    ▶ Play: The way backSOLUTION HIDDEN25 XP
  8. 41

    Level 41: How far?

    AloneMedium

    Objective: Tell Kern how many routers stand between you and castle (10.36.9.9).

    TTL (time to live) is a packet's life counter: each router it crosses takes 1, and Linux starts replies at 64. ping shows ttl=, traceroute lists every router.

    Commands taughttraceroute

    ▶ Play: How far?SOLUTION HIDDEN25 XP
  9. 42

    Level 42: Detour

    Alone⏱ TimedHard

    Objective: PAGER: village (10.37.2.2) is unreachable from you, fix the road.

    Two things broke at once: gate stopped forwarding, and a neighbour entry has the wrong MAC. Fix one and the ping still fails.

    ▶ Play: DetourSOLUTION HIDDEN35 XP
  10. 43

    Level 43: Power cut

    Alone⏱ TimedHard

    Objective: PAGER: since the reboot, west (10.29.1.2) cannot reach east (10.29.2.2) through you: fix it now and for every boot after.

    Someone "made it permanent" last month. Then the power went out.

    ▶ Play: Power cutSOLUTION HIDDEN35 XP
  11. 44

    Level 44: BOSS: The long road

    Boss⏱ TimedHard

    Objective: Make ping 10.38.3.2 (far) work from your machine.

    You → r1 → r2 → far. Three streets, two routers, and every signpost you can break is broken.

    ▶ Play: BOSS: The long roadSOLUTION HIDDEN65 XP

World 5Subnet Dojo

16 levels

Cut streets in halves, quarters and eighths, plan a whole office with VLSM, and drill until subnetting is a reflex.

  1. 45

    Level 45: Halves

    GuidedEasy

    Objective: Two rounds: split the /24 in ~/question.txt into two halves and tell Kern both (kern 10.x.y.0/25 10.x.y.128/25).

    One more prefix bit cuts a street in two: a /24 (256 addresses) becomes two /25s of 128. The second half starts at .128.

    Commands taughtsubnetting

    ▶ Play: HalvesSOLUTION HIDDEN20 XP
  2. 46

    Level 46: Quarters

    GuidedEasy

    Objective: Three rounds: which /26 is street number N of the /24 in ~/question.txt? (kern 10.x.y.128/26)

    Two more bits: four /26 streets of 64. They start at .0, .64, .128 and .192 (multiples of the block size).

    ▶ Play: QuartersSOLUTION HIDDEN20 XP
  3. 47

    Level 47: Eighths

    GuidedEasy

    Objective: Three rounds: which /27 street holds the address in ~/question.txt? (kern 10.x.y.96/27)

    Eight /27 streets of 32: .0, .32, .64, .96, .128, .160, .192, .224. To find the street of an address: the biggest multiple of 32 at or below its last number.

    ▶ Play: EighthsSOLUTION HIDDEN20 XP
  4. 48

    Level 48: Fit and mask

    GuidedEasy

    Objective: Three rounds: for the host count in ~/question.txt tell Kern the prefix and the mask (kern /26 255.255.255.192).

    Hosts → smallest prefix → mask: 50 hosts → /26 (62 usable) → 255.255.255.192. Past 254 hosts the third octet joins in: 500 hosts → /23 → 255.255.254.0.

    ▶ Play: Fit and maskSOLUTION HIDDEN25 XP
  5. 49

    Level 49: Wildcards

    GuidedEasy

    Objective: Three rounds: tell Kern the wildcard mask for the prefix in ~/question.txt (kern 0.0.0.63).

    A wildcard mask is the mask upside down: 255 minus each octet. /26 = 255.255.255.192 → wildcard 0.0.0.63. Router ACLs and OSPF speak in wildcards.

    Commands taughtroute-math

    ▶ Play: WildcardsSOLUTION HIDDEN25 XP
  6. 50

    Level 50: First and last

    GuidedEasy

    Objective: Three rounds: tell Kern the first and last usable host of the street in ~/question.txt (kern FIRST LAST).

    Usable hosts sit between the network and the broadcast: first = network + 1 (often the gateway), last = broadcast - 1.

    ▶ Play: First and lastSOLUTION HIDDEN25 XP
  7. 51

    Level 51: The office plan

    AloneMedium

    Objective: Plan the office: write ~/plan.txt with one line per department, NAME NETWORK/PREFIX, inside the block in ~/office.txt.

    VLSM: biggest department first, each gets the smallest street that fits, each street starts right after the previous one.

    Commands taughtvlsm

    ▶ Play: The office planSOLUTION HIDDEN40 XP
  8. 52

    Level 52: Overlap

    AloneMedium

    Objective: Two rounds: tell Kern the names of the two networks in ~/question.txt that overlap (kern net-b net-e).

    Two subnets overlap if one street contains the other's network address. Overlaps break routing, VPNs and cloud peering.

    ▶ Play: OverlapSOLUTION HIDDEN30 XP
  9. 53

    Level 53: Summary

    AloneMedium

    Objective: Two rounds: tell Kern the one route that summarizes the networks in ~/question.txt (kern 10.x.y.0/22).

    Neighbour streets that fill a bigger aligned block can be announced as one: 10.1.4.0/24 to 10.1.7.0/24 = 10.1.4.0/22 (4 = 2 bits less).

    ▶ Play: SummarySOLUTION HIDDEN30 XP
  10. 54

    Level 54: Longest match

    GuidedEasy

    Objective: Three destinations in a row: tell Kern the next hop (via) your machine uses for the address in ~/question.txt.

    When several routes contain the destination, the longest prefix (most specific) wins. hidden get DEST asks the kernel which one it would use.

    ▶ Play: Longest matchSOLUTION HIDDEN30 XP
  11. 55

    Level 55: Paper table

    AloneMedium

    Objective: Three rounds: tell Kern the next hop for the destination in ~/question.txt using ~/table.txt.

    No kernel to ask this time: the table is on paper (~/table.txt). Same rule: longest prefix that contains the destination wins.

    ▶ Play: Paper tableSOLUTION HIDDEN35 XP
  12. 56

    Level 56: Build it

    AloneMedium

    Objective: Read ~/plan.txt and give router gate's eth1 (sales) and eth2 (dev) the first usable address of each street, so s1 and d1 can ping each other.

    A plan only counts once it routes. Router legs take the FIRST usable address of each street: the hosts already point their default gateway there.

    ▶ Play: Build itSOLUTION HIDDEN40 XP
  13. 57

    Level 57: Speed: hosts

    Alone⏱ TimedHard

    Objective: Five in a row: tell Kern the smallest prefix for each host count (kern /N).

    Five in a row, against the clock: hosts in, prefix out. Come back for endless reps.

    ▶ Play: Speed: hostsSOLUTION HIDDEN40 XP
  14. 58

    Level 58: Speed: ranges

    Alone⏱ TimedHard

    Objective: Five in a row: tell Kern the network and broadcast of each address (kern NETWORK BROADCAST).

    Network and broadcast of a random address, five in a row, against the clock.

    ▶ Play: Speed: rangesSOLUTION HIDDEN40 XP
  15. 59

    Level 59: The endless dojo

    Alone⏱ TimedHard

    Objective: Answer ten mixed questions in a row with kern ANSWER.

    Every kind of question, mixed, ten in a row. This is the dojo's infinite drill: replay it daily and subnetting becomes a reflex.

    ▶ Play: The endless dojoSOLUTION HIDDEN60 XP
  16. 60

    Level 60: BOSS: The branch office

    Boss⏱ TimedHard

    Objective: Plan the branch in ~/plan.txt, then give gate and the three hosts their addresses so all of them can ping each other.

    A new branch: three departments, one /24, one router. Plan it, then build it, until every department pings every other.

    ▶ Play: BOSS: The branch officeSOLUTION HIDDEN90 XP

World 6The Owl's Library

13 levels

Names for numbers: /etc/hosts, getent, resolv.conf, asking a DNS server with dig, reverse lookups and lying phonebooks.

  1. 61

    Level 61: The phonebook

    GuidedEasy

    Objective: Add meadow (10.41.0.2) to your /etc/hosts so that hidden answers.

    Packets need numbers, people like names. The oldest phonebook is /etc/hosts: an address, then its names, one per line.

    Commands taughtetc-hosts

    ▶ Play: The phonebookSOLUTION HIDDEN15 XP
  2. 62

    Level 62: Their book

    GuidedEasy

    Objective: Tell Kern the address the name oracle has on owl.

    getent hosts NAME resolves a name exactly the way programs on that host will. Each lab host has its own phonebook (/etc/netns/HOST/hosts).

    ▶ Play: Their bookSOLUTION HIDDEN15 XP
  3. 63

    Level 63: Ask the owl

    GuidedEasy

    Objective: Ask the owl's DNS server (10.43.0.53) for treasure.lab and tell Kern the address.

    A DNS (Domain Name System) server is a phonebook other hosts can ask over the network. dig @SERVER NAME asks it directly.

    Commands taughtdig

    ▶ Play: Ask the owlSOLUTION HIDDEN20 XP
  4. 64

    Level 64: Trust the owl

    GuidedEasy

    Objective: Make your machine use the owl (10.44.0.53) for DNS, so that hidden works.

    Programs don't run dig; they ask the servers listed in /etc/resolv.conf (nameserver lines).

    Commands taughtresolv-conf

    ▶ Play: Trust the owlSOLUTION HIDDEN20 XP
  5. 65

    Level 65: Mail route

    GuidedEasy

    Objective: Ask the owl (10.49.0.53) which host receives mail for river.lab (its MX record) and tell Kern that host.

    Names hold more than addresses. An MX record says which host takes the mail for a domain: dig @SERVER NAME MX asks for it.

    Commands taughtdns-records

    ▶ Play: Mail routeSOLUTION HIDDEN20 XP
  6. 66

    Level 66: Nickname

    GuidedEasy

    Objective: www.river.lab is a nickname: ask the owl (10.49.0.53) and tell Kern the real name it points to.

    A CNAME says "this name is just a nickname for that one". dig shows the CNAME first, then the address of the real name.

    ▶ Play: NicknameSOLUTION HIDDEN20 XP
  7. 67

    Level 67: Best before

    GuidedEasy

    Objective: Ask the owl (10.49.0.53) for river.lab and tell Kern how many seconds its answer may be cached.

    Every DNS answer has a TTL: how many seconds others may keep it in their cache. dig +noall +answer shows it, right after the name.

    ▶ Play: Best beforeSOLUTION HIDDEN20 XP
  8. 68

    Level 68: Who knocks?

    AloneMedium

    Objective: Something at the address in ~/knock.txt keeps knocking: ask the owl (10.45.0.53) its name and tell Kern.

    DNS works backwards too: a PTR record turns an address into a name (dig -x).

    ▶ Play: Who knocks?SOLUTION HIDDEN25 XP
  9. 69

    Level 69: Stale page

    AloneMedium

    Objective: treasure.lab moved, the owl knows the new address, but your machine still uses the old one: fix it.

    /etc/hosts is read before DNS. One stale line there overrules every server.

    ▶ Play: Stale pageSOLUTION HIDDEN25 XP
  10. 70

    Level 70: Silent owl

    Alone⏱ TimedHard

    Objective: PAGER: hidden fails on your machine; fix it, then tell Kern the name the owl gives 10.47.5.9.

    Names broke across the whole machine.

    ▶ Play: Silent owlSOLUTION HIDDEN35 XP
  11. 71

    Level 71: Three answers

    AloneMedium

    Objective: Ask the owl (10.49.0.53) about ghost.lab and vault.lab, then tell Kern both statuses in that order (kern STATUS STATUS).

    dig's header line says how the question went: NOERROR (name exists), NXDOMAIN (no such name) or SERVFAIL (the server failed: its zone is broken).

    ▶ Play: Three answersSOLUTION HIDDEN25 XP
  12. 72

    Level 72: Migration night

    Alone⏱ TimedHard

    Objective: PAGER: tell Kern river.lab's mail host, the real name behind www.river.lab, river.lab's TTL and old.river.lab's status (kern MAIL REAL TTL STATUS).

    The ops team moves river.lab tonight and needs four facts from the owl (10.49.0.53), fast.

    ▶ Play: Migration nightSOLUTION HIDDEN40 XP
  13. 73

    Level 73: BOSS: The lying owl

    Boss⏱ TimedHard

    Objective: Make village resolve bank.lab via the real owl (10.48.0.53) and ping it.

    Village sends its savings to bank.lab. But village's phonebooks were tampered with, and a fake owl answers at 10.48.0.66.

    ▶ Play: BOSS: The lying owlSOLUTION HIDDEN65 XP

World 7The Harbor

11 levels

Docks for packets: ports, TCP and UDP, who listens where (ss), talking raw with nc and socat, bind addresses and port scans.

  1. 74

    Level 74: Dock numbers

    GuidedEasy

    Objective: Tell Kern which TCP port harbor is listening on.

    An address finds a machine; a port (a numbered dock: ssh waits on 22, the web on 80) finds the program on it. ss -ltn lists the TCP ports where programs listen.

    Commands taughtportsss

    ▶ Play: Dock numbersSOLUTION HIDDEN15 XP
  2. 75

    Level 75: Knock knock

    GuidedEasy

    Objective: Connect to harbor (10.52.0.2) on port 7000 with nc and tell Kern the password it gives you.

    nc HOST PORT opens a TCP conversation with whatever listens there and shows what it says.

    Commands taughtnc

    ▶ Play: Knock knockSOLUTION HIDDEN15 XP
  3. 76

    Level 76: Open shop

    GuidedEasy

    Objective: Listen on port 9000 in the background, saving what arrives into ~/inbox.txt; harbor has a letter for you.

    A server is just a program waiting on a port. nc -l PORT waits for one visitor and prints what it says.

    ▶ Play: Open shopSOLUTION HIDDEN20 XP
  4. 77

    Level 77: The lighthouse

    GuidedEasy

    Objective: Harbor's lighthouse beams a word at your UDP port 5000: catch it and tell Kern.

    UDP has no phone call: messages (datagrams) are thrown at a port like postcards. nc -u -l PORT catches them.

    ▶ Play: The lighthouseSOLUTION HIDDEN20 XP
  5. 78

    Level 78: Every visitor

    GuidedEasy

    Objective: Serve 'welcome' on port 8080 to every visitor with socat, running in the background.

    nc -l serves one visitor and quits. socat TCP-LISTEN:PORT,fork,reuseaddr SYSTEM:CMD gives every visitor their own copy of CMD.

    Commands taughtsocat

    ▶ Play: Every visitorSOLUTION HIDDEN20 XP
  6. 79

    Level 79: Sonar

    GuidedEasy

    Objective: Scan ports 1-1000 on lookout (10.51.0.2) with nmap and tell Kern the one port that is filtered.

    nmap scans many ports at once and labels each: open (a program answers), closed (nobody listens) or filtered (silence: a firewall dropped the knock).

    Commands taughtnmap

    ▶ Play: SonarSOLUTION HIDDEN20 XP
  7. 80

    Level 80: Wrong door

    AloneMedium

    Objective: Harbor's shop on port 8080 only answers harbor itself: make it answer you at 10.56.0.2:8080 with its SHOP OPEN sign.

    A program listening on 127.0.0.1 only hears its own host. 0.0.0.0 (or the host's address) hears everyone.

    ▶ Play: Wrong doorSOLUTION HIDDEN25 XP
  8. 81

    Level 81: Port scan

    Alone⏱ TimedHard

    Objective: From your machine, find the two open TCP ports below 1000 on lookout (10.57.0.2) and tell Kern both.

    nc -z tries ports without sending anything; nmap does the same, faster. Any scanner will do.

    ▶ Play: Port scanSOLUTION HIDDEN35 XP
  9. 82

    Level 82: Night shift

    Alone⏱ TimedHard

    Objective: The harbor master beams (UDP, to your port 5000) which TCP port to open: listen there and save the cargo into ~/cargo.txt.

    The harbor master only radios, never calls.

    ▶ Play: Night shiftSOLUTION HIDDEN35 XP
  10. 83

    Level 83: Impostor

    Alone⏱ TimedHard

    Objective: PAGER: an impostor holds port 8080 on harbor, get the REAL SHOP back for visitors at 10.58.0.2.

    Two programs can't listen on the same port. The real shop is waiting for its pier back.

    ▶ Play: ImpostorSOLUTION HIDDEN35 XP
  11. 84

    Level 84: BOSS: The registry

    Boss⏱ TimedHard

    Objective: Make harbor answer 'REGISTRY OK' on port 6000 to every visitor from you (harbor is 10.59.0.2).

    The harbor registry must answer every ship. It's down, its pier is squatted, and the dock light is off.

    ▶ Play: BOSS: The registrySOLUTION HIDDEN65 XP

World 8The Market

15 levels

Where creatures trade: HTTP by hand, curl, status codes, POST, peeking at TLS certificates, and ssh tunnels to back rooms.

  1. 85

    Level 85: By hand

    GuidedEasy

    Objective: Fetch /menu.txt from market (10.61.0.80, port 80) with nc and tell Kern today's dish.

    HTTP is plain text over TCP: send GET /path HTTP/1.0 and an empty line, and the server answers a status line, headers, a blank line and the page.

    Commands taughthttp

    ▶ Play: By handSOLUTION HIDDEN15 XP
  2. 86

    Level 86: Status

    GuidedEasy

    Objective: Tell Kern the HTTP status code market (10.62.0.80) gives for /vault.

    Every answer starts with a status code: 200 OK, 301 moved, 404 not found. curl -I shows just the status and headers.

    Commands taughtcurl

    ▶ Play: StatusSOLUTION HIDDEN15 XP
  3. 87

    Level 87: Place an order

    GuidedEasy

    Objective: Order 3 apples: POST item=apple&qty=3 to http://10.63.0.80/cgi-bin/order.

    GET asks; POST sends data in the body, like a filled-in form. curl -d DATA URL posts it.

    ▶ Play: Place an orderSOLUTION HIDDEN20 XP
  4. 88

    Level 88: Name badge

    GuidedEasy

    Objective: Tell Kern the DNS name in the SAN of the certificate on 10.64.0.2 port 443.

    TLS encrypts the conversation, and the server shows a certificate. Its subject (CN) is only a label; the names it is really valid for are in the SAN (Subject Alternative Name) list, and that is what clients check.

    Commands taughttls

    ▶ Play: Name badgeSOLUTION HIDDEN20 XP
  5. 89

    Level 89: The secret key

    GuidedEasy

    Objective: Create ~/tls/key.pem, an EC private key on the P-256 curve, readable only by you.

    Every certificate starts with a private key: a secret only you hold. openssl genpkey makes one; nobody else may read it.

    Commands taughtpki

    ▶ Play: The secret keySOLUTION HIDDEN15 XP
  6. 90

    Level 90: The request

    GuidedEasy

    Objective: From ~/tls/key.pem, write ~/tls/market.csr asking for the name market.lab (CN and SAN).

    A CSR (certificate signing request) is the form you hand a CA: your public key plus the names you want. Put the name in the SAN with -addext subjectAltName=DNS:NAME.

    ▶ Play: The requestSOLUTION HIDDEN20 XP
  7. 91

    Level 91: The notary

    GuidedEasy

    Objective: You run the market's little CA (~/ca/ca.pem + ~/ca/ca.key): sign ~/tls/market.csr into ~/tls/cert.pem, keeping its SAN.

    A CA signs a CSR with its own key: openssl x509 -req -in REQ -CA ca.pem -CAkey ca.key. -copy_extensions copy keeps the SAN you asked for; openssl verify -CAfile ca.pem cert.pem proves the stamp.

    ▶ Play: The notarySOLUTION HIDDEN20 XP
  8. 92

    Level 92: Trust, on purpose

    GuidedEasy

    Objective: Fetch https://shop.lab/ with certificate checks on, trusting the market CA saved in ~/market-ca.pem, and tell Kern the page's word.

    curl refuses a certificate it can't link to a CA it trusts. The fix is never -k (that trusts everybody): hand curl the right CA with --cacert FILE.

    ▶ Play: Trust, on purposeSOLUTION HIDDEN20 XP
  9. 93

    Level 93: The back room

    GuidedEasy

    Objective: Vault's ledger listens only on vault's own 127.0.0.1:8080: tunnel to it with ssh and tell Kern the ledger's word.

    ssh -L 8080:127.0.0.1:8080 HOST opens your port 8080 and carries it, encrypted, to HOST's own 127.0.0.1:8080. -f -N keep it in the background with no shell.

    Commands taughtssh-tunnel

    ▶ Play: The back roomSOLUTION HIDDEN20 XP
  10. 94

    Level 94: Delivery hatch

    AloneMedium

    Objective: Your bakery listens on your own 127.0.0.1:5000: let vault (10.67.0.2) reach it at vault's 127.0.0.1:5000.

    ssh -R works the other way round: it opens a port on the far host that leads back to you.

    ▶ Play: Delivery hatchSOLUTION HIDDEN25 XP
  11. 95

    Level 95: Your own badge

    AloneMedium

    Objective: From scratch: a new private key ~/tls/key.pem (only you can read it) and a self-signed ~/tls/cert.pem for market.lab, with the name in the SAN.

    openssl req -x509 is openssl req -new that signs its own form: a self-signed certificate. That is exactly how a CA certificate is born.

    ▶ Play: Your own badgeSOLUTION HIDDEN30 XP
  12. 96

    Level 96: The audit

    Alone⏱ TimedHard

    Objective: Let vault's auditor fetch your ledger at vault's 127.0.0.1:9999 (yours is on your 127.0.0.1:8000), then POST done=yes to http://10.68.0.2:8080/cgi-bin/audit.

    The auditor sits on vault and trusts only vault's own 127.0.0.1.

    ▶ Play: The auditSOLUTION HIDDEN40 XP
  13. 97

    Level 97: Rush order

    Alone⏱ TimedHard

    Objective: Buy 4 of the item in ~/want.txt: POST item=NAME&qty=4&total=PRICE*4 to http://10.70.0.80/cgi-bin/order (prices at /prices.txt).

    Prices change by the minute.

    ▶ Play: Rush orderSOLUTION HIDDEN35 XP
  14. 98

    Level 98: Renewal night

    Alone⏱ TimedHard

    Objective: PAGER: build a new CA (~/ca/ca.pem + ca.key) and a shop.lab cert signed by it (~/shop/cert.pem + key.pem, SAN, keys 600); Kern installs and tests them.

    The market CA's key was lost, so its old certificates are worthless.

    ▶ Play: Renewal nightSOLUTION HIDDEN45 XP
  15. 99

    Level 99: BOSS: The secure ledger

    Boss⏱ TimedHard

    Objective: Find the ledger's port with ss on vault (10.69.0.2), then tell Kern its certificate's DNS name and its page's word (kern NAME WORD), without -k.

    Vault's secure ledger speaks HTTPS only to vault itself, with a certificate signed by vault's CA (~/vault-ca.pem). Prove who it is and what it says, checks on.

    ▶ Play: BOSS: The secure ledgerSOLUTION HIDDEN65 XP

World 9The Wall

16 levels

Watching and guarding: tcpdump nets, iptables and nft walls, default-deny, NAT, and the final outage.

  1. 100

    Level 100: Butterfly net

    GuidedEasy

    Objective: Something keeps sending you UDP on wire0: catch it with tcpdump and tell Kern the destination port.

    tcpdump catches the packets crossing an interface and prints one line per creature: from, to, port. -n skips name lookups, -c N stops after N.

    Commands taughttcpdump

    ▶ Play: Butterfly netSOLUTION HIDDEN15 XP
  2. 101

    Level 101: Read the letter

    GuidedEasy

    Objective: Among the noise on wire0, one UDP flow goes to port 7777: read its secret word and tell Kern.

    Filters choose which creatures to catch (udp port 7777, host X), and -A prints what they carry as text.

    ▶ Play: Read the letterSOLUTION HIDDEN20 XP
  3. 102

    Level 102: First wall

    GuidedEasy

    Objective: Stop bully (10.73.0.66) from reaching your machine with iptables; friend (10.73.0.7) must still get through.

    A firewall is a bouncer: iptables rules in the INPUT chain (packets coming in) decide each creature's fate. sudo iptables -A INPUT -s ADDR -j DROP throws away everything from ADDR.

    Commands taughtiptables

    ▶ Play: First wallSOLUTION HIDDEN20 XP
  4. 103

    Level 103: Wrong brick

    GuidedEasy

    Objective: Someone walled out friend (10.74.0.7) by mistake: delete only that rule, keep the others.

    iptables -L INPUT -n --line-numbers lists the rules with numbers; iptables -D INPUT N deletes rule N.

    ▶ Play: Wrong brickSOLUTION HIDDEN20 XP
  5. 104

    Level 104: The new wall

    GuidedEasy

    Objective: Block bully (10.75.0.66) with nft in a table named wall (leave iptables empty); friend (10.75.0.7) must still get through.

    nftables is the modern firewall: a table holds chains, a chain hooks into input, rules go in the chain.

    Commands taughtnft

    ▶ Play: The new wallSOLUTION HIDDEN20 XP
  6. 105

    Level 105: Closed by default

    GuidedEasy

    Objective: Set your INPUT policy to DROP, then ping friend (10.81.0.7) and watch what happens.

    The chain policy is what happens to every packet that no rule matched. hidden turns your wall into "nobody gets in unless a rule says so".

    ▶ Play: Closed by defaultSOLUTION HIDDEN15 XP
  7. 106

    Level 106: Let replies in

    GuidedEasy

    Objective: With the policy still DROP, make your own ping to friend (10.82.0.7) work again without opening anything to newcomers.

    The kernel tracks every conversation (conntrack). -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT lets in packets that answer something you started, and nothing else.

    ▶ Play: Let replies inSOLUTION HIDDEN20 XP
  8. 107

    Level 107: One door open

    GuidedEasy

    Objective: You serve the shop on TCP 8080 and a private tool on 9090: let friend (10.83.0.7) reach 8080, and only 8080.

    With the policy DROP and replies allowed, open exactly what you serve: sudo iptables -A INPUT -p tcp --dport PORT -j ACCEPT. Everything else stays shut.

    ▶ Play: One door openSOLUTION HIDDEN20 XP
  9. 108

    Level 108: Default deny

    AloneMedium

    Objective: Set your INPUT policy to DROP with only TCP port 8080 open to others, while your own pings to friend (10.76.0.7) still work.

    Safest wall: drop everything by default (policy DROP), then open only what you serve. Allow ESTABLISHED,RELATED, or the replies to your own pings (they come back IN) get dropped too.

    ▶ Play: Default denySOLUTION HIDDEN30 XP
  10. 109

    Level 109: The costume

    GuidedEasy

    Objective: Village pings you through gate: catch them on gate's eth1 and on your wire0, and tell Kern both sources (kern BEFORE AFTER).

    Gate already masquerades: packets it forwards toward you leave with gate's address as the source. tcpdump on both sides of gate shows the costume going on.

    ▶ Play: The costumeSOLUTION HIDDEN20 XP
  11. 110

    Level 110: Disguise

    AloneMedium

    Objective: Village (10.77.2.2) must ping you at 10.77.1.1 without you adding any route: masquerade on gate.

    Masquerade: a router rewrites the source of packets it forwards to its own address, and undoes it on the replies.

    Commands taughtnat

    ▶ Play: DisguiseSOLUTION HIDDEN30 XP
  12. 111

    Level 111: The blueprint

    GuidedEasy

    Objective: ~/wall.nft is a ready-made wall that blocks bully (10.85.0.66): check it with nft -c -f, then load it.

    Real walls are written in a file and loaded in one go: sudo nft -f FILE replaces rules all at once, or changes nothing if the file has an error.

    ▶ Play: The blueprintSOLUTION HIDDEN20 XP
  13. 112

    Level 112: A wall that remembers

    AloneMedium

    Objective: Your live wall blocks bully (10.86.0.66): save it to /etc/nftables.nft (starting with flush ruleset) and enable the nftables service at boot.

    Everything typed with nft lives in memory and dies at reboot. At boot, the nftables service loads /etc/nftables.nft (Alpine: rc-update add nftables; RHEL/Debian: systemctl enable nftables).

    Commands taughtfirewall-map

    ▶ Play: A wall that remembersSOLUTION HIDDEN30 XP
  14. 113

    Level 113: Intruder

    Alone⏱ TimedHard

    Objective: PAGER: a host keeps knocking on your port 8080: find it with tcpdump on hive0, block only it in nft table wall, and save the wall to /etc/nftables.nft.

    Somebody is hammering your shop. Your wall here is nft table inet wall (chain input).

    ▶ Play: IntruderSOLUTION HIDDEN45 XP
  15. 114

    Level 114: Lockdown

    Alone⏱ TimedHard

    Objective: Lock your INPUT down (policy DROP, only TCP 8080 open, replies allowed), and let village (10.80.2.2, behind gate) reach your 8080 without you adding routes.

    Two walls to build, against the clock.

    ▶ Play: LockdownSOLUTION HIDDEN40 XP
  16. 115

    Level 115: BOSS: The great outage

    Boss⏱ TimedHard

    Objective: Make curl http://10.79.2.2/ show the shop page while gate still blocks port 23, fixing causes rather than adding relays.

    The shop on village (10.79.2.2) is down: four things are broken between you and it, and gate must keep blocking telnet (port 23). The shop service reads /etc/shop.conf, and hidden applies it.

    ▶ Play: BOSS: The great outageSOLUTION HIDDEN80 XP

World 10Leases & Clocks

17 levels

Addresses handed out by a librarian (DHCP), rogue librarians, empty shelves, and the clock tower every certificate trusts (NTP).

  1. 116

    Level 116: Library card

    GuidedEasy

    Objective: Get a lease on lan0 from the librarian, then read what you received.

    DHCP hands a newcomer everything at once: an address, a gateway and DNS servers. udhcpc -i IF -n -q asks for it once and quits.

    Commands taughtdhcpudhcpc

    ▶ Play: Library cardSOLUTION HIDDEN25 XP
  2. 117

    Level 117: DORA

    GuidedEasy

    Objective: Record a DHCP conversation to a file, then read it back.

    DORA = Discover (client shouts), Offer (server proposes), Request (client says yes please), Ack (server confirms). Ports 67 (server) and 68 (client).

    ▶ Play: DORASOLUTION HIDDEN25 XP
  3. 118

    Level 118: Card for life

    GuidedEasy

    Objective: Make lan0 use DHCP at boot: add an auto lan0 + iface lan0 inet dhcp stanza to /etc/network/interfaces, then bring it up with ifup.

    udhcpc by hand is forgotten at reboot. In /etc/network/interfaces, "iface lan0 inet dhcp" makes ifup run the DHCP client at every boot.

    ▶ Play: Card for lifeSOLUTION HIDDEN25 XP
  4. 119

    Level 119: Open the library

    GuidedEasy

    Objective: Serve DHCP on hive0 so pup gets an address from your pool.

    Now you are the librarian. dnsmasq reads a small config: which interface, which pool (dhcp-range), and port=0 so it does DHCP only.

    Commands taughtdnsmasq

    ▶ Play: Open the librarySOLUTION HIDDEN30 XP
  5. 120

    Level 120: Directions

    GuidedEasy

    Objective: Give pup a gateway and DNS: add both options to ~/lan.conf, restart dnsmasq and renew pup's lease.

    DHCP options add the way out (option 3, router) and the name helper (option 6, DNS) to the address. dnsmasq reads its config at start, so restart it after editing.

    ▶ Play: DirectionsSOLUTION HIDDEN30 XP
  6. 121

    Level 121: Reserved seat

    AloneMedium

    Objective: Reserve 10.86.0.50 for printer inky by its MAC in ~/lan.conf, restart dnsmasq and renew inky.

    A reservation ties a MAC to one address: dhcp-host=MAC,IP. Printers and servers get the same address every time, still through DHCP.

    ▶ Play: Reserved seatSOLUTION HIDDEN35 XP
  7. 122

    Level 122: Short stay

    AloneMedium

    Objective: Make the café's leases last 10 minutes (dhcp-range ...,10m), restart dnsmasq and renew pup.

    The lease time is the last field of dhcp-range (10m, 1h, 12h). Busy cafés use short leases so addresses of people who left come back quickly.

    ▶ Play: Short staySOLUTION HIDDEN35 XP
  8. 123

    Level 123: Relay

    AloneMedium

    Objective: Run a DHCP relay on router gate so pup (10.88.2.0/24) gets a lease from keeper (10.88.1.10) on the other street.

    A Discover is a broadcast, and routers do not forward broadcasts. A DHCP relay on the router passes it to the server as a normal packet (Cisco: ip helper-address).

    ▶ Play: RelaySOLUTION HIDDEN40 XP
  9. 124

    Level 124: The tent

    AloneMedium

    Objective: Get pup (stuck on 169.254) a real address from keeper, whose /etc/dnsmasq.conf is fine.

    A 169.254.x.x address (APIPA) means the host asked for DHCP and nobody answered. Fix the server, then renew the client.

    ▶ Play: The tentSOLUTION HIDDEN35 XP
  10. 125

    Level 125: The ledger

    AloneMedium

    Objective: Tell Kern the hostname of the machine at the address in ~/complaint.txt (kern NAME).

    The server keeps a ledger of every card: /var/lib/misc/dnsmasq.leases (expiry, MAC, IP, hostname). "Who has this IP?" starts there.

    ▶ Play: The ledgerSOLUTION HIDDEN30 XP
  11. 126

    Level 126: Empty shelves

    Alone⏱ TimedHard

    Objective: Get the laptop host an address on hive0 (10.91.0.0/24) from your DHCP server (~/lan.conf).

    Pager: a new laptop gets no address, because old leases filled a tiny pool.

    ▶ Play: Empty shelvesSOLUTION HIDDEN50 XP
  12. 127

    Level 127: Rogue librarian

    Alone⏱ TimedHard

    Objective: Find the rogue DHCP server on hive0 (tcpdump in the background, then wait), cut it off (bridge port or process), and renew pup to get gateway 10.92.0.1.

    Pager: hosts on hive0 get a gateway that is not ours. Two DHCP servers answer: the real one (10.92.0.1) and a rogue.

    ▶ Play: Rogue librarianSOLUTION HIDDEN60 XP
  13. 128

    Level 128: Clock tower

    GuidedEasy

    Objective: Sync your clock to the tower (10.93.0.123) with chrony.

    chronyd keeps your clock in step with a time server over NTP (UDP 123). One server line in /etc/chrony/chrony.conf, start chronyd, ask chronyc.

    Commands taughtchrony

    ▶ Play: Clock towerSOLUTION HIDDEN30 XP
  14. 129

    Level 129: Be the tower

    AloneMedium

    Objective: Make your machine (10.94.0.1) serve time to 10.94.0.0/24 so pup can sync from you.

    chronyd can serve time too: "allow NETWORK" lets clients in, "local stratum N" lets it serve even with no upstream.

    ▶ Play: Be the towerSOLUTION HIDDEN40 XP
  15. 130

    Level 130: Wrong year

    Alone⏱ TimedHard

    Objective: Make curl --cacert ~/vault-ca.pem https://vault.lab/ work by syncing your clock to the tower (10.95.0.123).

    Pager: "the vault website is broken", yet the certificate is fine. Your clock thinks it is three years ago, so the certificate is "not yet valid".

    ▶ Play: Wrong yearSOLUTION HIDDEN60 XP
  16. 131

    Level 131: After the reboot

    Alone⏱ TimedHard

    Objective: Get pup (behind gate) a lease from keeper again, then make your lan0 take its address by DHCP at every boot.

    Pager after a maintenance night: the branch relay did not come back and your own uplink was configured by hand. Fix both, the second one for good.

    ▶ Play: After the rebootSOLUTION HIDDEN60 XP
  17. 132

    Level 132: BOSS: The new floor

    Boss⏱ TimedHard

    Objective: Serve the new floor: pool .100-.200 with gateway and DNS, the printer inky reserved at .50, and every host leased correctly.

    A new floor opens on hive0 (10.96.0.0/24, gateway 10.96.0.1, DNS 10.96.0.53) and you are its DHCP server. Every machine must come up on its own.

    ▶ Play: BOSS: The new floorSOLUTION HIDDEN100 XP

World 11Six

19 levels

The 128-bit city: hex addresses and shorthand, link-locals, routers that announce streets, AAAA, dual stack, and walls that must not forget ICMPv6.

  1. 133

    Level 133: Long names

    GuidedEasy

    Objective: Read wire0's link-local address, then ping meadow's link-local over wire0.

    An IPv6 address is 128 bits in 8 hex groups. Every interface gets a link-local fe80:: address by itself; it only works on its own wire, so you add %INTERFACE when you use it.

    Commands taughtipv6

    ▶ Play: Long namesSOLUTION HIDDEN20 XP
  2. 134

    Level 134: Shorthand

    GuidedEasy

    Objective: Three in a row: tell Kern the short form of the address in ~/question.txt.

    Two rules: drop the leading zeros of each group (0db8 → db8, 0000 → 0), then replace ONE longest run of zero groups with :: (the first one if tied). Write it in lower case.

    ▶ Play: ShorthandSOLUTION HIDDEN25 XP
  3. 135

    Level 135: Longhand

    AloneMedium

    Objective: Three in a row: tell Kern the full form (8 groups of 4) of the address in ~/question.txt.

    Backwards: pad every group to 4 digits, and expand :: into as many 0000 groups as needed to reach 8.

    ▶ Play: LonghandSOLUTION HIDDEN25 XP
  4. 136

    Level 136: A real address

    GuidedEasy

    Objective: Give wire0 the address 2001:db8:4::1/64 and ping meadow at 2001:db8:4::20.

    Global addresses work beyond your wire. Same ip command, with -6: hidden.

    ▶ Play: A real addressSOLUTION HIDDEN25 XP
  5. 137

    Level 137: The way out

    GuidedEasy

    Objective: Reach the far host 2001:db8:5:b::20 through the router at 2001:db8:5:a::1 (your wire0 already has 2001:db8:5:a::10/64).

    A v6 host needs a default route too: sudo hidden add default via ROUTER. hidden lists the table.

    ▶ Play: The way outSOLUTION HIDDEN30 XP
  6. 138

    Level 138: Neighbours

    GuidedEasy

    Objective: Ping meadow (2001:db8:6::20), then tell Kern meadow's MAC from your v6 neighbour table.

    IPv6 has no ARP. Neighbour Discovery asks over ICMPv6 instead, and ip -6 neigh shows what it learned: address → MAC.

    Commands taughticmpv6

    ▶ Play: NeighboursSOLUTION HIDDEN25 XP
  7. 139

    Level 139: Announced streets

    GuidedEasy

    Objective: Read the address SLAAC built on wire0 from router r's adverts, and the gateway it picked.

    The router announces its street (Router Advertisement). Your machine builds a global address by itself (SLAAC) and takes the router's link-local as default gateway.

    Commands taughtslaac

    ▶ Play: Announced streetsSOLUTION HIDDEN30 XP
  8. 140

    Level 140: Name from a MAC

    GuidedEasy

    Objective: Three rounds: tell Kern the 64-bit interface id SLAAC would build from the MAC in ~/question.txt (kern 5054:ff:fe12:3456).

    EUI-64: split the MAC in half, put ff:fe in the middle, and flip the 0x02 bit of the first byte. 52:54:00:12:34:56 → 5054:00ff:fe12:3456 → written short 5054:ff:fe12:3456.

    ▶ Play: Name from a MACSOLUTION HIDDEN30 XP
  9. 141

    Level 141: Privacy please

    AloneMedium

    Objective: Turn on privacy addresses on leaf's eth0 (its address gives away its MAC) until a temporary address shows up.

    Privacy addresses (RFC 8981) are random temporary interface ids for outgoing traffic, so websites cannot track your MAC. On Linux: net.ipv6.conf.IF.use_tempaddr=2.

    ▶ Play: Privacy pleaseSOLUTION HIDDEN35 XP
  10. 142

    Level 142: Be the crier

    AloneMedium

    Objective: Make router r advertise its street 2001:db8:10::/64 on eth1 so leaf builds a global address.

    A v6 router announces its streets itself. dnsmasq can send the adverts: --enable-ra --dhcp-range=::,constructor:IF,ra-only (prefix taken from IF's address).

    ▶ Play: Be the crierSOLUTION HIDDEN40 XP
  11. 143

    Level 143: Dead end

    AloneMedium

    Objective: Find and fix the router that does not forward IPv6 on the way to far (2001:db8:11:c::20).

    traceroute6 shows each v6 router on the way. Where the hops stop is where to look: a router must have net.ipv6.conf.all.forwarding=1 to pass packets on.

    ▶ Play: Dead endSOLUTION HIDDEN40 XP
  12. 144

    Level 144: Quad A

    GuidedEasy

    Objective: Ask the owl (10.12.0.53) for shop.lab's AAAA record and tell Kern the IPv6 address.

    A records hold IPv4 addresses, AAAA ("quad A") records hold IPv6 ones. dig AAAA NAME @SERVER asks for them.

    ▶ Play: Quad ASOLUTION HIDDEN25 XP
  13. 145

    Level 145: Two roads

    AloneMedium

    Objective: Find out which of shop.lab's two addresses curl uses by default, and which one with -4.

    When a name has both A and AAAA, programs try IPv6 first (and fall back to v4). curl -v shows which one it used; -4 and -6 force a family.

    ▶ Play: Two roadsSOLUTION HIDDEN35 XP
  14. 146

    Level 146: Silent wall

    Alone⏱ TimedHard

    Objective: Make http://[2001:db8:14::80]/ work again by allowing the ICMPv6 that IPv6 needs on shop, keeping the policy drop and port 2222 closed.

    Pager: after a firewall change, shop works over IPv4 but IPv6 times out. The ruleset forgot that IPv6 needs ICMPv6 to find neighbours.

    ▶ Play: Silent wallSOLUTION HIDDEN60 XP
  15. 147

    Level 147: Site plan

    AloneMedium

    Objective: Three rounds: tell Kern the /64 of street number N (decimal) in the /48 from ~/question.txt (kern 2001:db8:abcd:1a::/64).

    A site usually gets a /48, and the fourth group numbers its /64 streets in hex: 2001:db8:abcd:0::/64 to 2001:db8:abcd:ffff::/64. Street 26 is 2001:db8:abcd:1a::/64.

    ▶ Play: Site planSOLUTION HIDDEN35 XP
  16. 148

    Level 148: The translator

    GuidedEasy

    Objective: Two rounds: tell Kern the NAT64 address (64:ff9b::/96) for the IPv4 address in ~/question.txt.

    NAT64 lets v6-only hosts reach v4 servers: DNS64 writes the IPv4 address into the last 32 bits of 64:ff9b::/96. 192.0.2.33 = c0.00.02.21 → 64:ff9b::c000:221.

    ▶ Play: The translatorSOLUTION HIDDEN30 XP
  17. 149

    Level 149: Speed: six

    Alone⏱ TimedHard

    Objective: Answer five questions in a row with kern ANSWER.

    Five in a row: shorthand, longhand, EUI-64 and /64 plans. Replay any time: endless reps.

    ▶ Play: Speed: sixSOLUTION HIDDEN50 XP
  18. 150

    Level 150: Slow site

    Alone⏱ TimedHard

    Objective: Find where IPv6 to shop.lab dies and fix it, so curl -6 http://shop.lab/ works.

    Pager: "our IPv6 phones cannot open shop.lab." The name has an AAAA record, so the v6 road must be broken somewhere.

    ▶ Play: Slow siteSOLUTION HIDDEN60 XP
  19. 151

    Level 151: BOSS: Dual stack

    Boss⏱ TimedHard

    Objective: Give gate v6 on both legs, let the hosts configure themselves, and fix gate's firewall so w1 reaches e1's web page over IPv6 and nothing else.

    The company goes dual stack: router gate links west (w1) and east (e1, the web server), and IPv4 already works. Add IPv6 without opening the wall.

    ▶ Play: BOSS: Dual stackSOLUTION HIDDEN110 XP

For teachers

Use these levels with a class

SOLUTION HIDDEN Teachers see answer keys in the classroom.

For teachers
ROOTSPIRE
DiscsFor teachers
▶ Play freeLibrary 16 discsDiscsFor teachersLog in