In Phase 1 the web login crossed the wire in clear text. HTTPS wraps it in TLS, so a capture shows only encrypted bytes. You’ll make a self-signed certificate for the lab; a real site would use one from a certificate authority.
1. Make a certificate on the server
The private key is written inside the server and never leaves it.
The web server watches for that certificate and starts HTTPS on :443 within a second or two. Plain :80 then redirects there.
2. Open 443 at the firewall
3. Capture a login over HTTPS
4. Look for the password
5. Check that plain HTTP now redirects
You should see
- The password search:
0. Nothing readable. - The HTTP check:
301, a redirect to HTTPS.
Compare with Phase 1, step 4, where the same search found the password in plain text.
What it means
The login is the same; the wire is not. TLS encrypts everything after the first handshake, so a capture on the firewall shows only the server’s certificate and then noise. The -k in curl tells it to accept a self-signed certificate, which a browser would warn about; a real certificate removes the warning.