Linux Labs

Networking / Stage 13 of 14

Restore a service from client to answer

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 7 · lab · 40 minhard

Site unreachable from another host

The site on node2 answers itself but does not open from node1. There may be several causes — find them all and keep nginx healthy.

Situation

A site was set up with nginx on node2. On node2 itself curl http://localhost/ answers with a page, while from node1 curl http://node2/ gets no answer. The site must open from node1 at http://node2/.

Run commands on node2 from node1 over SSH: ssh node2 'command'. At every login ssh prints Warning: Permanently added 'node2'… — that is how the practice pair is set up, and it does not affect the commands.

Task

  1. From node1, ping node2 gets a reply.
  2. From node1, curl http://node2/ gets code 200.
  3. nginx on node2 is healthy: sudo nginx -t passes and the nginx service is active.

There is no internet in the lab — only the network between node1 and node2. Everything you need is installed on both machines.

Lab · on your own

No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.

Goals

0 of 3
  • node2 replies to ping from node1 — not done yet
  • http://node2/ returns HTTP 200 to a request from node1 — not done yet
  • On node2 nginx -t passes and the nginx service is active — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 3
  • node2 replies to ping from node1 — not done yet
  • http://node2/ returns HTTP 200 to a request from node1 — not done yet
  • On node2 nginx -t passes and the nginx service is active — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 3
  • node2 replies to ping from node1 — not done yet
  • http://node2/ returns HTTP 200 to a request from node1 — not done yet
  • On node2 nginx -t passes and the nginx service is active — not done yet
Loading…