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.
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.
Without the filter nc got Connection refused. What does that mean?
-
nft flush rulesetdeletes rules and leaves programs alone. The refusal came fromlab-node2itself: nobody waits on that port and address. -
It was: with the filter
curlwaited three seconds and got nothing. Without itlab-node2answered — 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.