Skip to content
EgyKode
02 · The application, in containersLab 13 / 59
Guided labnetworking

HTTP & TLS Troubleshooting

Take a failing HTTPS request apart layer by layer: DNS, TCP, TLS, HTTP — and know which one broke.

Time
50 min
Level
Intermediate
Objectives
4 objectives
Cost
Free

Where this fits in the platform

This lab adds

  • The ability to diagnose a broken certificate before it is public

Which lets you

Before you start

You will need

  • curl
  • openssl
  • dig
  • nc

You do not need these already — the lab environment below provides them.

You will be able to

  • Inspect a certificate chain and its expiry from the command line
  • Separate a TLS failure from an HTTP failure
  • Read `curl -v` output as a sequence of layers

CostFree

— uses public endpoints and a local container.

Nothing to pay in the browser. Open the terminal runs this against a simulated cloud — the same API calls and the same commands, with no account and no bill. The figure above applies only if you build it in your own.

The scenario#

"The site is down." It returns a certificate error in one browser, works in another, and curl fails with something different again.

Each of those is a different layer, and the fix depends entirely on which one.

Hands-on environment

Run this lab in a real terminal, free and in your browser. The environment is temporary and yours alone — break it as much as you like.

Open the terminal

Opens in Killercoda, in a new tab — keep this page open for the steps.

Run it on your own machine

Run this lab on your own machine. One command starts the environment, with everything the lab needs already installed:

You will need:

  • docker
git clone https://github.com/EgyKode/EgyKode-lab.git
cd EgyKode-lab
./egykode start
./egykode shell

You need Docker and Git installed. Everything else runs inside the environment. The first start downloads it and takes a few minutes; later starts are seconds.

Not sure what you already have? Run: npm run doctor — it checks and changes nothing.

Anything you tick here is your own record. EgyKode cannot see inside that terminal, so the success criteria stay self-assessed even when the environment checks your work for you.

DNS

Step 1 of 5

The four layers, in order#

text
DNS  ->  TCP  ->  TLS  ->  HTTP
dig      nc       openssl   curl

curl -v walks all four in one command, and its output is readable as exactly that sequence:

Terminal
curl -v https://egykode.com/ 2>&1 | head -20
text
* Host egykode.com:443 was resolved.          <- DNS worked
* Connected to egykode.com (52.84.143.46)      <- TCP worked
* TLS handshake, Certificate (11):             <- TLS in progress
* SSL certificate verify ok.                   <- TLS worked
> GET / HTTP/2                                 <- HTTP begins

Whichever line is missing is the layer that failed.

Success criteria

0 of 4

The concept behind it

Ready to try it without help?Do the challenge

Phase complete · 02 The application, in containers

You can now: The application runs locally in production-shaped containers, behind a reverse proxy, over TLS.

Next phase

Lab 13 of 59 on the project path

03 · AWS by handAWS IAM & Least PrivilegeWrite a policy that grants exactly one action, prove what it blocks, and swap a long-lived key for a role.50 minBeginner

Previous: Reverse Proxy & Load Balancing with Nginx