Linux Labs

Networking / Stage 13 of 14

Restore a service from client to answer

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 7 · on a machine · 6 min

The filter is gone, yet the site is silent

What you will learn

  • Tell from the kind of failure which stage and which machine to look at.
  • Change the nginx listen address and check that it really changed.
  • Confirm a restore with a real client request and a healthy service.

The site on lab-node2 does not open from lab-node1. A colleague is sure: "It's the filter. Drop all the rules and it will work." Check whether they are right.

The machines are the same lab-node1 and lab-node2 namespaces as in the previous lesson. nc -zv address port checks one thing: whether the port accepts a connection.

Exercise · look

The filter is gone — now what?

Request the site at 192.0.2.12:8080 from lab-node1. Then remove all filter rules on lab-node2, as a colleague suggested, and test the port again — with nc.

First, predict

The filter is gone. What will nc say about port 8080?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

Without the filter nc got Connection refused. What does that mean?

  • nft flush ruleset deletes rules and leaves programs alone. The refusal came from lab-node2 itself: nobody waits on that port and address.

  • It was: with the filter curl waited three seconds and got nothing. Without it lab-node2 answered — if only with a refusal.

  • A site answers an HTTP request, and things never got that far: the connection was refused at the port.

lab-node2 sent the refusal: the packet now gets through, but nobody listens on port 8080 at 192.0.2.12.

Ubuntu 24.04
Loading…