A practice site was set up on the lab-server server on port 8080. The administrator checked on the server itself, and the page opens. From the lab-client client it does not. Compare the two requests.
curl requests a page at an address and prints it. Start on the card builds the client and the server.
The same site from two sides
Request the site on the server itself at 127.0.0.1:8080, then from the client at the server's address, 192.0.2.10:8080.
First, predict
On the server the page opens. What will the client get at the server's address, 192.0.2.10:8080?
Now start the exercise, run the command and compare your prediction with the output.
Why was the client refused while the page opened on the server?
-
The site is running: on the server
curl http://127.0.0.1:8080/still printsports-lab-ok. -
The server is visible on the network:
sudo ip netns exec lab-client ping -c 1 192.0.2.10gets a reply. -
curlon the client runs undersudo, with the same rights as on the server.
The site opened its socket on 127.0.0.1:8080, and nobody listens on port 8080 at 192.0.2.10.