Skip to content
LFCSNetworkingSingle Linux VMMedium

Reverse proxy and load balancer with nginx

Scenario lfcs-net-005 · about 6 minutes · 7 points · 6 grader checks

Publish two local backends behind one nginx virtual host with round-robin balancing, the original Host header and a status path answered by nginx itself.

  • nginx
  • reverse-proxy
  • load-balancing
  • upstream
  • http

What you will practise

  • Define an upstream group and proxy a virtual host to it
  • Forward the original Host header
  • Answer a path directly from the proxy

Start this lab

With the CLI installed and signed in, this command provisions a fresh Ubuntu 24.04 LTS virtual machine on your Mac, applies the scenario setup and prints the task below.

goldenkube start lfcs-net-005

Task

The task text exactly as the CLI shows it. Solve it on the machine, then run goldenkube submit.

Two instances of an application run on this host, on 127.0.0.1:9001 and 127.0.0.1:9002. The name app.lab.internal resolves to 127.0.0.1. Configure nginx so that: 1. requests to http://app.lab.internal/ are load-balanced across both instances (round robin) 2. the backends receive the original Host header sent by the client 3. http://app.lab.internal/status is answered by nginx itself with status 200 and the body ok (it is not proxied) 4. nginx is running now and starts at boot.

Requirements and details

Certification
LFCS · Linux Foundation Certified System Administrator
Domain
Networking
Difficulty
Medium
Environment
Single Linux VM
Recommended time
6 minutes
Points
7
Grader checks
6
Operating system
Ubuntu 24.04 LTS
Minimum CLI version
0.1.0
Scenario version
1
Published

Grading runs locally: 6 state checks read your machine when you submit; the scenario passes when every check passes. Hints, the reference solution and the check definitions are available only inside the CLI, not on this page.

LFCSNetworkingHard

Bond, bridge, IPv4/IPv6 addresses, a static route and name resolution

Build an active-backup bond and a bridge from dummy interfaces, address the bridge with IPv4 and IPv6, add a static route and a hosts entry, all persistent.

Single Linux VM · ~9 min · 9 points

  • bonding
  • bridge
  • ipv6
  • static-route
  • netplan
  • systemd-networkd
  • hosts

goldenkube start lfcs-net-001

LFCSNetworkingEasy

Time synchronisation with chrony and the time zone

Point chrony at two internal time servers only, allow a client network to query it, enable it, and set the system time zone.

Single Linux VM · ~4 min · 6 points

  • chrony
  • ntp
  • time
  • timezone
  • timedatectl

goldenkube start lfcs-net-002

LFCSNetworkingMedium

Harden the OpenSSH server and set up a client profile

Make sshd listen on two ports with key-only logins limited to one group, then give a user a key pair and a host alias that works without prompts.

Single Linux VM · ~7 min · 8 points

  • openssh
  • sshd
  • ssh-keys
  • ssh-config
  • hardening

goldenkube start lfcs-net-003

LFCSNetworkingHard

Packet filtering, port redirection and NAT with nftables

Write a persistent nftables ruleset with a default-drop input chain, a port redirect and source NAT, and track down an unexpected listener.

Single Linux VM · ~8 min · 9 points

  • nftables
  • firewall
  • nat
  • port-redirection
  • ss
  • troubleshooting

goldenkube start lfcs-net-004

Independent community project, not affiliated with or endorsed by CNCF or The Linux Foundation. Lab results are practice feedback, not an exam score.